1
0
Fork 0
mirror of https://github.com/ganelson/inform.git synced 2024-07-16 14:04:24 +03:00
inform7/resources/Documentation/Examples/MattressKing.txt

23 lines
1.1 KiB
Plaintext
Raw Normal View History

Example: * Mattress King
Location: Going by, going through, going with
RecipeLocation: Going, Pushing Things in Directions
Index: PUSH something a direction with extra phrasing
Description: Adding extra phrasing to the action to PUSH something in a direction.
For: Z-Machine
2019-02-05 02:44:07 +02:00
By default, when the player pushes something a direction, Inform checks to make sure that the object is pushable between rooms. If not, it blocks the action; if so, it carries out a normal going action with the pushed object taken along.
Also by default, this action produces only a description of the new room that we've traveled into. But suppose we would like to print a short message describing the pushing action first:
2023-07-24 23:57:30 +03:00
{*}"Mattress King"
2019-02-05 02:44:07 +02:00
Monica's Bedroom is a room. The Living Room is south of Monica's Bedroom. Rachel's Bedroom is south of the Living Room.
After going a direction (called way-pushed) with something (called the thing-pushed):
say "You push [the thing-pushed] [way-pushed] to [the location].";
continue the action.
2019-02-05 02:44:07 +02:00
The race car bed is an enterable supporter in Monica's Bedroom. It is pushable between rooms.
Test me with "push bed south".