Chapter 7: Basic Actions

§7.1. Actions; §7.2. Instead rules; §7.3. Before rules; §7.4. Try and try silently; §7.5. After rules; §7.6. Reading and talking; §7.7. The other four senses; §7.8. Rules applying to more than one action; §7.9. All actions and exceptional actions; §7.10. The noun and the second noun; §7.11. In rooms and regions; §7.12. In the presence of, and when; §7.13. Going from, going to; §7.14. Going by, going through, going with; §7.15. Kinds of action; §7.16. Repeated actions; §7.17. Actions on consecutive turns; §7.18. Postscript on actions

arrow-up-left.pngContents of Writing with Inform
arrow-left.pngChapter 6: Descriptions
arrow-right.pngChapter 8: Change
arrow-down-right.pngIndexes of the examples

§7.1. Actions

"Actions" are what we get if we try to break down a narrative into its irreducible parts. We might casually say that we are "going shopping", but this involves many smaller steps: going north, going east, entering the shop, examining a loaf of bread, taking it, giving money to the baker, and so on.

An action is an impulse to do something. This may or may not be a reasonable aspiration, and may or may not be achieved. The player's exploration of an interactive fiction is made by a sequence of actions, so much of the designing process comes down to responding to these actions.

We write actions using present participles. For instance, if the player types "take napkin" or "get the napkin" or something similar then the resulting action would be written as:

taking the napkin

The details of what words the player actually typed are unimportant to us: we deal only in actions.

Every action ends in success or failure. In this context, success means only that the player's intention has been fulfilled. If the player sets out to take the napkin, but finds a million-pound banknote in its folds instead, the action will be deemed to be a failure.

The testing command ACTIONS causes Inform to log every action as it happens, and what its outcome is. (ACTIONS OFF turns this off again.) For instance:

[going south]
Security Vault
You can see a metal door here.
[going south - succeeded]
>close door
[closing metal door]
You close the metal door.
[closing metal door - succeeded]
>take door
[taking metal door]
That's fixed in place.
[taking metal door - failed the can't take what's fixed in place rule]

A good way to get a sense of the constant flow of actions is to use this command and then wander around an existing work, trying things out. ACTIONS can also give an insight into the web of rules governing play: there are nine or ten different ways an attempt to take something can fail, for instance.

arrow-up.pngStart of Chapter 7: Basic Actions
arrow-left.pngBack to Chapter 6: Descriptions: §6.16. Counting while comparing
arrow-right.pngOnward to §7.2. Instead rules