Inform 7 Home Page / Documentation
§6.11. Waiting, Sleeping
The standard WAIT command makes time pass at the same rate that it would anyway - one minute per turn. In a story where events happen at specific times of day, though, we might want to give the player more control. Nine AM Appointment shows how to give the player a WAIT 10 MINUTES command, while Delayed Gratification lets him WAIT UNTIL a specific time of day.
Ordinarily, Inform also refuses to allow the player to SLEEP and WAKE UP: the commands exist, but have no effect. Change of Basis lets the player put himself into a sleep state in which he cannot do anything. A somewhat more interesting expansion on this idea would be to let the player sleep and have dreams; there are no examples specifically of dream states, but we might consult the examples on scenes about how to disrupt one environment and move the player to another, entirely new one.
See Scene Changes for ways to move the player to a new environment such as a dream state
|Start of Chapter 6: Commands|
|Back to §6.10. Entering and Exiting, Sitting and Standing|
|Onward to §6.12. Other Built-In Actions|
Nine AM Appointment
If there's some reason the player needs to be at a specific place and time, we might want to allow him to wait a number of minutes at once.
Carry out waiting more:
let the target time be the time of day plus the time understood;
decrease the target time by one minute;
while the time of day is not the target time:
follow the turn sequence rules.
The one nuance here is that after our wait command occurs, the turn sequence rules will occur one more time. So we need to subtract one minute from the parsed time to make the turn end on the desired number of minutes.
And if we want to ensure that the player doesn't (accidentally or intentionally) put the interpreter through a really long loop, we could put an upper limit on his patience:
The Specialist's Office is a room. The secretary is a woman in the Office. Instead of asking the secretary about "[appointment]", say "'Hang on just five more minutes,' she says, in a distracted manner."
Change of Basis
Suppose we want to allow the player to go to sleep some of the time:
The important thing to note here is that it does not work to say "the player is either asleep or awake". This is because the player is not necessarily one specific person or thing during the game: the identity of the player can be changed, as we will see later.
So if we want to make rules about the properties of the player, we should attach these rules to the "person" kind.
Now a few rules about changing from one state to the other:
Check hanging around until:
if the time of day is the time understood, say "It is [time understood] now!" instead;
if the time of day is after the time understood, say "It is too late for that now." instead.
At 11:45 PM:
say "Suddenly the air is filled with light and the sounds of an approaching band. Over the crest of the hill comes a parade of singing, stomping, hooting people: and not just people, but dogs, horses, elephants, giraffes... There are banners, and candles, and a flag that glows eerie-green in the dark; there is a float shaped like an enormous turtle, its shell covered with winking green lights; there is an old man dressed as a skeleton, carried in a litter, his neck garlanded with dried chiles. There are small girls throwing rose petals from a basket, and grown women half-naked carrying the emblems of Bacchic revelry, and two little boys each with a silver basin of clear water. All these go by in procession, and you join on at the end.";
end the story finally.