So, I'm wasting valuable world-building time by muscling around with two painfully simple scripts that I'm not getting right.
I was hoping someone better at scripting could quickly see what I'm doing wrong and repair my broken scripts.
First one is a plant which I want to slowly translate 80 units up (I currently have it done in 40 seconds) and rotate 45 degrees at 6AM every morning and then settle back down at 8AM.
Begin AZ_scr_daybreakerShort DaybreakerMovingFloat Timer if ( GameHour == 6 ) If ( DaybreakerMoving == 0 ) Set Timer to Timer + GetSecondsPassed If ( Timer <= 40 ) MoveWorld X 2 Else Set Timer to 0 Set DaybreakerMoving to -1 Endif EndifEndifif ( GameHour == 8 ) If ( DaybreakerMoving == -1 ) Set Timer to Timer + GetSecondsPassed If ( Timer <= 40 ) MoveWorld X -2 Else Set Timer to 0 Set DaybreakerMoving to 0 Endif EndifElse SetAtStart EndifendifEnd
The second is a portal which I want to disable at any time of day except dawn and dusk. This one seems really simple but it just wasn't working.
Begin AZ_dawndusk_activatorif ( GameHour > 6 ) if ( GameHour < 8 ) ;hour is 6 to 8 AM Enable endifendifif ( GameHour > 18 ) if ( GameHour < 20 ) ; hour is 6 to 8 PM Enable endifendifelse DisableendifendifEnd
Thanks in advance. I'm going to go back to placing rocks for a while now.