Begin PutThisScriptOnLights
short IsDay ; 0 = initiate, 1 = night, 2 = day
if (IsDay == 2)
if (GameHour > 19 ) ;Dusk
disable
set IsDay to 1
endif
return
elseif (IsDay == 1)
If (GameHour >= 8 ) ;dawn
enable
set IsDay to 2
endif
return
else ;IsDay = 0
if (GameHour < 8 ) ;disable the light when the script first starts if it's before dawn
disable
set IsDay to 1
else
set IsDay to 2
endif
endif
End PutThisScriptOnLights
I haven't tested it, but it should work, provided I got the syntax right...
Oh, you should probably know that the script won't be properly initiated until the next frame after it's started. That's about 1/30 second lag for startup
WindowLights
Moderators: Haplo, Lead Developers
-
- Member
- Posts: 101
- Joined: Mon Sep 22, 2003 4:41 am
- Location: Usually Tel Ouada, otherwise, try Elsweyr
WindowLights
Last edited by RaJevir on Sun Feb 01, 2004 7:34 am, edited 1 time in total.
"Scrib specimen number two escaped from its pen today. Again. I shall have to find some other way to limit its mobility, as building higher walls seems to have little effect" -Mistress Rathra