# Maximum time length of scenes ?

Hi

I have a problem with scenes : it seems like a scene which ends after a long time… never ends, in fact.

I tried this :

[code]“TimeTest2” by Stephane F

World is a room.

The DayNumber is a number that varies. The DayNumber is 1.

say line break ;
let Z be a random number between 300 and 600 ;
repeat with X running from 1 to Z
begin ;
follow the turn sequence rules ;
end repeat.

Noon is a recurring scene.
Noon begins when the time of day is 12:00 pm.
Noon ends when the time since Noon began is 1 minute.

When Noon begins :
say “[time of day] : Noon[roman type].”.

When Noon ends :
say “[time of day] : A new afternoon begins[roman type].”.

Midnight is a recurring scene.
Midnight begins when the time of day is 12:00 am.
Midnight ends when the time since Midnight began is 1 minute.

When Midnight begins :
increment the DayNumber ; say “[time of day] : Midnight.”.

When Midnight ends :
say “[time of day] : A new day begins (day [DayNumber]).”.

Night is a recurring scene.
Night begins when the time of day is 10:00 pm.
Night ends when the time since Night began is 960 minutes.

When Night begins :
say “[time of day] : Night falls.”.

When Night ends :
say “[bold type][time of day] : The sun rises.”.
[/code]

You can sleep and pass hours and days, the scene " night " (supposed to end after 960 minutes) never does. While the other scenes work.

Beside that, when I type " scenes " it gives crazy sh*t like that :

6:26 am (day 2) > scenes
Scene ‘Entire Game’ playing (for -154 mins now)
Scene ‘Noon’ ended
Scene ‘Midnight’ ended
Scene ‘Night’ playing (for -934 mins now)
(Scene monitoring now switched on. Type “scenes off” to switch it off again.)

How can a scene have a negative length ?

“time since” is clock time, so it can’t be more than 24 hours and it can be negative. (Actually I’m not sure the modulo is handled right. It would be more useful if the result were 0-to-24-hours, or else -12-to-12-hours.)

There’s no “turns since scene began”, so you’ll want to record the turn count in a “when scene begins” rule and then make comparisons to that.