1
0
Fork 0
mirror of https://github.com/ganelson/inform.git synced 2024-07-07 17:44:22 +03:00
inform7/resources/Documentation/Examples/Whence.txt
2023-07-24 11:56:58 +01:00

21 lines
1.3 KiB
Plaintext

Example: *** Whence?
Location: Text with variations
RecipeLocation: Doors, Staircases, and Bridges
Index: Door kind that describes the destination
Description: A kind of door that always automatically describes the direction it opens and what lies on the far side (if that other room has been visited).
For: Z-Machine
It would be fairly tedious reading to have a large game full of doors that describe themselves this way. Nonetheless, if we insisted we could use our knowledge of the map as leverage to make every door in the game describe itself automatically.
To do this, we make use of the phrase "direction of (the door) from (a room)" -- in this case, the direction of the door we're looking at when viewed from the player's location. Thus:
{*}"Whence?"
The temporal vortex is an open door. It is west of Yesterday and east of Today.
The initial appearance of a door is usually "Nearby [an item described] leads [if the other side of the item described is visited][direction of the item described from the location] to [the other side of the item described][otherwise][direction of the item described from the location][end if]."
Test me with "w / e".
Yet a further variation on this, which can automatically understand "the east door" and "the west door" when appropriate, may be found in the example "Whither?".