Thread: Day/Night
View Single Post
 
Try this..
Reply
Posted 2004-01-23, 11:16 AM in reply to 05thouldm's post starting "Ok I get that but my system has waits..."
CODE HAS CHANGED AFTER A QUICK RUN-THROUGH IN MY HEAD.

After reviewing the code, I wonder if the "waits" will simply advance one time period and THEN stop. Not what you want.

It might be best to do something like this: (Pseudocode time!)

<>Branch: TimeInEffect is ON
...<>Add 1 to "0024:Hour" variable
...<>Branch: Hour = 6
......<>Branch: Hour = 11
.........<>Branch: Hour = 15
............<>Branch: Hour = 20
...............<>Branch: Hour = 24
..................<>Set Hour to 0
..................<>
...............:End
...............<>Set screen as Night
...............<>
............:End
............<>Set screen as Afternoon
............<>
.........:End
.........<>Set screen as Mid-Day
.........<>
......:End
......<>Set screen as Morning
......<>
...:End
...<>Wait x seconds
...<>
:End


It's color-coded so you can see where the branches are nested. Change the hours to whatever you feel are appropriate.

This one's based on a 24-hour model I once used... the bonus is, you can have events that are based on the hours of the day! So you can have, say, a door to a shop that's disabled when Hour > 18 (6pm) or Hour < 6 (6am) or something.

And, of course, a "watch" item might come in handy to tell the time. You'll just use it to call a common event, that only consists of this line:

<>Message: "The time is \v[24] o'clock."

Change the 24 to whatever your "Hour" variable number is.. if it's [0001:Hour] then you'd change it to 1, for example.

Last edited by BlueCube; 2004-01-23 at 11:43 AM.
Old
Profile PM WWW Search
BlueCube enjoys the static noises of ten television sets simultaneously tuned to 412.84 MHzBlueCube enjoys the static noises of ten television sets simultaneously tuned to 412.84 MHz
 
 
BlueCube