Difference between revisions of "Complete Example Scripts"
Jump to navigation
Jump to search
m
→A helper script with functions to get the current moonphase, sync between the two moons and day of the week: Optimized If/ElseIf
imported>JustinOther m (→A Quest item you can drop and pick up again and set or reset objectives and Stages.: GetPlayer Δ PlayerREF) |
imported>JustinOther |
||
Line 372: | Line 372: | ||
PhaseTest = GameDaysPassed % 24 ;A full cycle through the moon phases lasts 24 days | PhaseTest = GameDaysPassed % 24 ;A full cycle through the moon phases lasts 24 days | ||
If | If PhaseTest >= 22 || PhaseTest == 0 | ||
Return 7 | |||
ElseIf | ElseIf PhaseTest < 4 | ||
Return 0 | |||
ElseIf | ElseIf PhaseTest < 7 | ||
Return 1 | |||
ElseIF | ElseIf PhaseTest < 10 | ||
Return 2 | |||
ElseIf | ElseIF PhaseTest < 13 | ||
Return 3 | |||
ElseIf | ElseIf PhaseTest < 16 | ||
Return 4 | |||
ElseIf | ElseIf PhaseTest < 19 | ||
Return 5 | |||
ElseIf PhaseTest < 22 | |||
Return 6 | |||
EndIf | EndIf | ||