Hello,
Trying to add the Sun as a backdrop to the example 183. The Hang of Thursdays (Writing with Inform), I manage to start with the Sun, then get it to disappear at night, and never have it return.
I don’t understand why it doesn’t reappear in the morning…
Here is the code:
[code]“The Hang of Thursdays”
The Stage is a room. Rule for printing the name of the stage: say “[current weekday] [current time period]” instead.
A weekday is a kind of value. The weekdays are Saturday, Sunday, Monday, Tuesday, Wednesday, Thursday, Friday. The current weekday is a weekday that varies. The current weekday is Saturday.
A time period is a kind of value. The time periods are morning, afternoon, evening, night. The current time period is a time period that varies. The current time period is afternoon.
The sun is a backdrop. The sun is everywhere. The description of the sun is “[sun phase]”.
To say sun phase:
if the current time period is:
– morning:
say "The fat sun shines gleefully on the fresh leaves. ";
– afternoon:
say "The sun, having just passed its culmination, still shows no intentions of setting—or settling. ";
– evening:
say "Red and tired, the sun slowly proceeds to its daily retirement. "
This is the new advance time rule:
if the current time period is less than night:
now the current time period is the time period after the current time period;
if the current time period is night, now the sun is nowhere;
otherwise:
now the current time period is morning;
now the sun is everywhere;
now the current weekday is the weekday after the current weekday.
The new advance time rule is listed instead of the advance time rule in the turn sequence rules.
Test me with “x sun / x sun / x sun / x sun / x sun / x sun” …
[/code]
I have added “now the sun is everywhere” in the New advance time rule, but it doesn’t seem to do the work.
Thanks