1
0
Fork 0
mirror of https://github.com/ganelson/inform.git synced 2024-07-05 08:34:22 +03:00
inform7/resources/Documentation/Examples/Eclipse.txt
2019-03-16 13:12:11 +00:00

40 lines
1.4 KiB
Plaintext

** Future events
(Scheduling an eclipse; Totality)
To schedule an eclipse of the sun, which involves a number of related events.
First we define the events, and then we create a phrase to schedule them:
{*}"Totality"
At the time when the penumbra appears:
say "The sunlight dies away to an eerie, brownish penumbra."
At the time when the eclipse begins:
say "The moon passes across the disc of the sun, plunging the world into darkness.";
now the Chamber is dark.
At the time when the eclipse ends:
say "The moon passes away from the sun, and a gloomy penumbral light returns.";
now the Chamber is lighted.
At the time when normal sunlight returns:
say "The sun shines once more bright in the sky, not to be eclipsed again on this spot for another thirty-seven years."
To schedule an eclipse for (totality - a time):
the penumbra appears at two minutes before totality;
the eclipse begins at totality;
the eclipse ends at three minutes after totality;
normal sunlight returns at five minutes after totality.
Now we make use of the new phrase:
{**}When play begins, schedule an eclipse for 3:27 PM.
The Chamber is a room.
The time of day is 3:25 PM.
Test me with "z / z / z / z / z / z / z / z / z".
We shall see much more about creating phrases later. Their advantage is that they enable a complicated sequence of operations to be given a meaningful name, and that they can be re-used many times as needed.