6.14. Remembering, Converting and Combining Actions

| Chapter 6: Commands |

| 6.14. Remembering, Converting and Combining Actions

Sometimes we want Inform to apply a player's action to a different target than the one specified: for instance, directing all (or almost all) commands from the doorknob to the door of which it is a part. Fine Laid demonstrates how to do this. Along the same lines, Lucy shows how to direct a player's conversation action to apply to a new conversation topic.

We can also record a series of actions performed by the player or by another character.

Cactus Will Outlive Us All demonstrates characters each of whom reacts to a very specific provocation; I Didn't Come All The Way From Great Portland Street implements a game show in which the player is not allowed ever to repeat an action he has already performed; and Leopard-skin implements a maze which the player can escape only by performing a specific sequence of actions.

Anteaters provides a peculiar gizmo that can remember actions performed in its presence and force the player to reiterate them.

89
| Example Fine Laid Making writing that can be separately examined from the paper on which it appears, but which directs all other actions to the paper. |
WI

92
| Example Lucy Redirecting a question about one topic to ask about another. |
WI

220
| Example Cactus Will Outlive Us All For every character besides the player, there is an action that will cause that character to wither right up and die. |
WI

422
| Example I Didn't Come All The Way From Great Portland Street In this fiendishly difficult puzzle, which may perhaps owe some inspiration to a certain BBC Radio panel game (1967-), a list is used as a set of actions to help enforce the rule that the player must keep going for ten turns without hesitation, repetition, or deviating from the subject on the card. |
WI

419
| Example Leopard-skin A maze that the player can escape if he performs an exact sequence of actions. |
WI

Suppose (as in Infocom's Leather Goddesses of Phobos) that we have a maze that the player can escape only by performing the correct sequence of actions in the correct order. One way to do this would be to keep a list of the player's most recent actions, and see whether these match up with the combination we have established as the maze's solution. For instance: "Leopard-skin" The Fur-Lined Maze is a room. "This seemingly endless sequence of rooms is decorated in a tasteful selection of exotic furs and gilded fixtures." Clapping is an action applying to nothing. Understand "clap" as clapping. Kweepaing is an action applying to nothing. Understand "kweepa" as kweepaing. Carry out clapping: say "You clap." Carry out kweepaing: say "You holler 'KWEEPA!' triumphantly." The maze-sequence is a list of stored actions that varies. When play begins: add the action of jumping to the maze-sequence; add the action of clapping to the maze-sequence; add the action of kweepaing to the maze-sequence. The attempted-sequence is a list of stored actions that varies. Every turn when the player is in the Fur-Lined Maze: truncate the attempted-sequence to the last two entries; add the current action to the attempted-sequence; if the attempted-sequence is the maze-sequence: say "That does it! You are instantly transported from the maze!"; end the story finally. Test me with "hop / clap / clap / hop / kweepa / hop / clap / kweepa".

222
| Example Anteaters The player carries a gizmo that is able to record actions performed by the player, then force him to repeat them when the gizmo is dropped. This includes storing actions that apply to topics, as in "look up anteater colonies in the guide". |
WI

Previous | Contents | Next