| 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 then ...

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

> ... if we are taking a container then ...

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, too: 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.

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

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

Previous | Contents | Next