| 6.10. Entering and Exiting, Sitting and Standing |
Under ordinary circumstances, Inform does not keep track of the player's posture, nor of his exact location in a room. Lies implements a room in which the player can lie in different positions on the floor, getting different views as a result.
Our other examples are all modifications of the way Inform handles player movement to make better default guesses at what he wants to do: Anchorite adds a GET DOWN and DOWN command that work when the player is on a supporter, to accompany GET UP, GET OFF, and GET OUT (already understood). Hagia Sophia makes the player rise before heading in a compass direction, but only if movement in that direction is actually possible. And Get Axe makes the player get out of a portable container before attempting to lift it - a consideration that comes up relatively rarely, but that might pertain to inflatable rafts, beanbag chairs, and other lightweight but capacious pieces of furniture.
See Position Within Rooms for a box the player can push around the room and stand on in different locations
See The Human Body for letting the player sit, stand, or lie down systematically on furniture or on the floor
See Furniture for various objects on which the player can sit or stand
| Example Lies Commands to allow the player to lie down in three different ways. | |
| Example Anchorite By default, Inform understands GET OFF, GET UP, or GET OUT when the player is sitting or standing on an enterable object. We might also want to add GET DOWN and DOWN as exit commands, though: | |
|  Example Hagia Sophia If the player tries to go a valid direction while on a supporter, make him stand up first; if he tries to go a nonexistent one, print a special refusal. | |
By default, if the player asks to go some direction while he is sitting down, he'll be told to get up first. If we wanted to make his life a little easier, we might add a rule to do this automatically for him:
"Hagia Sophia"
Before going somewhere when the player is on a supporter (called the chaise):
say "(first getting off [the chaise])[line break]";
silently try exiting.
Dome is a room. North of Dome is North Chapel. South of the Dome is South Chapel. West of the Dome is Western End. Quiet Corner is northwest of the Dome, north of Western End, and west of North Chapel. Loud Corner is east of North Chapel, northeast of Dome, and north of Eastern End. Eastern End is north of Dim Corner and east of Dome. Dim Corner is southeast of Dome and east of South Chapel. Ruined Corner is southwest of Dome, west of South Chapel, and south of Western End.
The church door is east of Eastern End and west of the Courtyard. The church door is a door.
The folding chair is an enterable supporter in the Dome. The folding chair is portable.
Test me with "sit on chair / w / e / get chair / w / drop chair / sit on chair / w".
Now the player will always get up before trying to walk out of a room; and the fact that we've said "going somewhere" means that this rule will not occur if the direction typed is not valid.
We will still get "you'll have to get off the chair" in the cases where the player has typed an invalid command, though, which is undesirable. We could override this too, by adding the following to our scenario:
Instead of going nowhere when the player is on a supporter (called the divan):
say "Nothing interesting lies in that direction, even if you weren't lazing about on [the divan]."
Now "test me" will produce this effect at the very end.
|
| Example Get Axe Changing the check rules to try automatically leaving a container before attempting to take it. (And arranging things so that other people will do likewise.) | |