Inform 7 Home Page / Documentation


§17.20. Multiple action processing

When the player types a command like DROP ALL, this is (usually) a request to carry out more than one action. After the command parser has decided what constitutes "ALL" (a process which can be influenced using the "deciding whether all includes" activity), it forms up a list and then runs through it, starting an action for each in turn. The result usually looks something like this:

>GET ALL
foxglove: Taken.
snake's head fritillary: Taken.

However, by adding rules to the rulebook:

multiple action processing rules

we can take a look at the actions intended, and rearrange or indeed change them before they take effect. To do that, we have to deal with a special list of objects. For two technical reasons this isn't stored as a "list of objects that varies" - first because it needs to exist even in low-memory situations where we can't afford full list-processing, and second because there are times when changing it might be hazardous. Instead, two phrases are provided to read the list and to write it back:

multiple object list ... list of objects

This phrase produces the current multiple object list as a value. The list will be the collection of objects found to match a plural noun like ALL in the most recent command typed by the player. If there is no multiple object, say if the command as TAKE PEAR, the list will be empty: it won't be a list of size 1.

alter the multiple object list to (list of objects)

This phrase sets the multiple object list to the given value. The list is ordinarily the collection of objects found to match a plural noun like ALL in the most recent command typed by the player, but using this phrase at the right moment (before the "generate action r le" in the turn sequence rules takes effect).


arrow-up.png Start of Chapter 17: Understanding
arrow-left.png Back to §17.19. Does the player mean...
arrow-right.png Onward to §17.21. Understanding mistakes

**ExampleThe Best Till Last
Reordering multiple objects for dramatic effect.

**ExampleWestern Art History 305
Allowing EXAMINE to see multiple objects with a single command.