Difference between revisions of "Complete Example Scripts"
Jump to navigation
Jump to search
m
→Enable/Disable an object on a schedule: Condensed function variant
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) | ||
bEnableStuff = GetDayOfWeek() == 5 ; Turdas | |||
If bEnableStuff | |||
kYourObject.Enable() | kYourObject.Enable() | ||
Else | Else | ||
kYourObject.Disable() | kYourObject.Disable() | ||
EndIf | EndIf | ||
EndIf | EndIf |