9.12. Actions as conditions

| Chapter 9: Time |

| 9.12. Actions as conditions

There are two ways that descriptions of actions can be used as conditions. First, we can simply describe an action, and then the condition will be true if that is what the player is trying to do, and not otherwise:

> if taking a container, ...

This is actually an abbreviation for the longer, some would say preferable form:

> if we are taking a container, ...

Secondly, we can talk about the past as well as the present, which is very useful since interactive fiction often contains situations which are changed by earlier events.

> Instead of waiting when we have taken the lantern, say "No, your acquisitive nature is roused now, and simply waiting will no longer do."

More on the past tense later follows in the next section: note that "we are taking" has become "we have taken". For the rule to apply, it is not enough that the action "taking the lantern" has been tried: it must have succeeded.

147
| Example Night Sky A room which changes its description depending on whether an object has been examined. |
RB

148
| Example Zero A box which called "horribly heavy box" after the player has tried to take it the first time. |
RB

The names of objects might want to change also: "Zero" Weight is a kind of value. The weights are light, manageable, and horribly heavy. Everything has a weight. A thing is usually manageable. This does require a rule from Chapter 16, but it's a fairly straightforward one: Before printing the name of a horribly heavy thing (called weighty object): if we have taken the weighty object, say "[weight] ". The Nearly Empty Living Room is a room. "Nearly everything is out, all of Helen's possessions and most of yours." A man called Mr Zero is in the Nearly Empty Living Room. "Mr Zero, despite being heavily paid to assist in this operation, is giving you a look that clearly conveys his lack of interest in budging even one more item." The description of Mr Zero is "Many muscles, no hair." The book box is a horribly heavy thing in the Living Room. The clothing box is a manageable thing in the Living Room. A broom, a dustpan, some packing tape, and a discarded newspaper are light things in the Living Room. After taking a horribly heavy thing: say "Taken. (Oof.)" Test me with "get clothing / look / get book box / look / i / drop book box / look".

Previous | Contents | Next