Underside
version 5 by Eric Eve
Documentation
- Chapter: Underside
- Section: The Basics
- Section: Hiding and Finding Things Under Other Things
- Section: Testing for things being under other things
- Section: Revealing when Taking
- Section: Underside and Other Extensions
- Example: * Lost Sock - Putting and Finding Objects Under Other Objects.
Chapter: Underside
Section: The Basics
The Underside extension defines the Underside kind (a kind of container), which can be used for putting objects under other objects.
To use it, we need to define an object to be of kind Underside, and then make it a part of the object we want to put things under. For example, if we want to be able to put things under a bed we might define:
The bed is an enterable supporter.
An underside called under#bed is part of the bed.
It's a good idea to give the underside object a name the player is unlikely to type, since the player never needs to refer to it directly.
To have an object start under the bed we can then just write:
The slipper is a wearable thing in under#bed.
Then the command LOOK UNDER BED will report "Under the bed is a slipper."
The extension also provides the action "placing it under" which matches the grammar "put [things] under [something]". With the above example, PUT BALL UNDER BED would move the ball to under#bed, although to the player it would appear to be under the bed.