| 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: | |
With GET DOWN, we can replace the whole command, which will not interfere with the normal function of the TAKE verb, or allow the player to attempt to GET any other directions:
"Anchorite"
The Solitary Place is a room. "A glittering, shimmering desert without either locusts or honey." The pillar is an enterable supporter in the Solitary Place. "The broken pillar is short enough to climb and sit on." The description of the pillar is "Once it was a monument: a long frieze of battles and lion-hunts spirals up the side, in honor of an earthly king." The player is on the pillar.
Understand "get down" as exiting.
This doesn't cover the case where the player just types "DOWN", and we don't want to preempt the normal operation of the GO action here. So instead of writing a new understand instruction, we might catch this one at the action-processing level:
Instead of going down when the player is on a supporter:
try exiting.
Test me with "down / enter pillar / get down / down / get down".
|
| 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.) | |