Difference between revisions of "Complete Example Scripts"

Jump to navigation Jump to search
m
→‎Enable/Disable an object on a schedule: Fixed perpetuation if also checking for the day of week.
imported>JustinOther
imported>JustinOther
m (→‎Enable/Disable an object on a schedule: Fixed perpetuation if also checking for the day of week.)
Line 756: Line 756:
Float fTime = GameHour.GetValue()
Float fTime = GameHour.GetValue()
If bEnableStuff != (fTime > fHourToEnable && fTime < fHourToDisable)
If bEnableStuff != (fTime > fHourToEnable && fTime < fHourToDisable)
bEnableStuff = !bEnableStuff
If GetDayOfWeek() == 5 ; Turdas
If bEnableStuff && GetDayOfWeek() == 5 ; Turdas
kYourObject.Enable()
kYourObject.Enable()
bEnableStuff = True
Else
Else
kYourObject.Disable()
kYourObject.Disable()
bEnableStuff = False
EndIf
EndIf
EndIf
EndIf
Anonymous user

Navigation menu