7.19. Review of Chapter 7: Basic Actions

| Chapter 7: Basic Actions |

| 7.19. Review of Chapter 7: Basic Actions

1. The concept of actions. The player's commands to the game are translated by Inform into actions: taking the bar of chocolate, going west, looking, and so on. Many actions apply to objects within the game world. The first object named in an action is called the "noun"; the second, the "second noun". If the player types

> >UNLOCK THE CEDAR BOX WITH THE TINY KEY

Inform understands this command as the action "unlocking... with...", where the "noun" is the cedar box and the "second noun" is the tiny key. (The chapter on Understanding will explore how Inform interprets commands as actions.)

A few actions apply to pieces of text instead of objects. For instance:

> >ASK LINDSAY ABOUT THE PIE

Here Inform understands Lindsay as the "noun", but there is no "second noun". Instead, the "topic understood" is set to the text "the pie". The player could have typed absolutely anything here (ASK LINDSAY ABOUT DUTCH CLOG-DANCING, say), and we are reading the raw words he typed: we will only try to understand them later.

Finally, actions can apply to values. The chapters on Advanced Actions and Understanding discuss how to create actions suitable to handle commands involving times, numbers, values, and so on, as in

> >WAIT UNTIL 10 PM
> >DIAL THE SAFE TO 1147
> >SET THE PHASER TO STUN

2. Places to intervene. We may intervene in an action before it takes place, with a before or instead rule:

> Before taking the napkin, say...
> Instead of listening to Mozart: ...

or we may wait until afterward and then add some additional response:

> After going to an unvisited room: ...
> After pushing the detonator button: ...

In fact it is possible to meddle with the processing of an action at even more points, as we will see in the chapter on Advanced Actions. However, in practice the majority of simple changes to action behavior can be treated with one of these three types of rule.

3. Making an action happen. Sometimes we would like to make an action happen without the player having said so himself. In this case, we can write

> try opening the front door;
> silently try unlocking the safe;
> try silently unlocking the safe;

These last two are equivalent. ("Silently" means that nothing will be printed unless the attempt at safecracking fails: it doesn't mean the player's character is being quiet in the fictional world.)

4. Built-in actions. All actions are listed in the Actions tab of the Index, and this is the easiest place to browse the selection built in. It is, of course, possible to define additional actions of our own, as we will see in the chapter on Advanced Actions.

5. Writing rules about actions.

(a) Combinations of rules. Combined rules can apply to more than one different action:

> Instead of examining or looking under the sink: ...

We may not (currently) combine objects in one rule, like this:

> Instead of examining the sink or the stove: ...

We can however write rules that apply to anything matching some description. For instance, if we have a kind called "kitchen furnishing":

> Instead of examining a kitchen furnishing: say "It obviously has not been cleaned since Mrs. Closter gave up housekeeping for the family back in 1967."

We may also write rules that apply to all actions on a single object, so:

> Instead of doing something to the Porsche: say "Your father is extremely protective of that machine. If it came to choosing between you or it, there's no real guarantee of the outcome."

Finally, we can group together a whole range of actions under a single name:

> Jumping is loud behaviour.
> Shouting is loud behaviour.
> Eating the crisps is loud behaviour.

and then write rules pertaining to that class of action:

> Instead of loud behaviour: say "Ssh! The baby is finally asleep!"

(b) Circumstances. Rules about actions can also be constrained as to place, or spectators, or indeed any condition at all:

> Before touching something in the Antique Room: ...
> Instead of listening to something in the Loud Region: ...
> After doing something with the bomb in the presence of the guard dog: ...
> Instead of tasting something when the player is wearing the face mask: ...

(c) Repetitions. We may also talk about the number of times an action has already occurred:

> Instead of listening to the radio more than once: ...
> Instead of tasting the squashed fruit for the second time: ...
> Instead of waiting for four turns: ...

The last of these conditions requires that the turns be consecutive, while the first two do not.

(d) Special conditions on Going. The "going" action is complex enough to have a number of extra conditions of its own, so we may talk about

> Instead of going to the House from the garden by the tricycle through the French doors with the wheelbarrow: ...

where

> "to ..." indicates the room entered
> "from..." the room departed
> "by..." any vehicle transporting the player
> "through..." the door through which the player is passing
> "with..." any pushable item that the player is pushing along with him

Previous | Contents | Next