Difference between revisions of "Complete Example Scripts"

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

Navigation menu