| Chapter 7: Basic Actions |

| 7.13. Going from, going to

Going is an action defined like any other: it is the one which happens when the player tries to go from one location to another. But it is unlike other actions because it happens in two locations, not just one, and has other complications such as vehicles and doors to contend with. To make it easier to write legible and flexible rules, "going" is allowed to be described in a number of special ways not open to other actions, as demonstrated by the following example game:

> "Going Going"

> The Catalogue Room is east of the Front Stacks. South of the Catalogue Room is the Musicology Section.

> Instead of going nowhere from the Front Stacks, say "Bookcases obstruct almost all passages out of here."

> Instead of going nowhere, say "You really can't wander around at random in the Library."

> Before going to the Catalogue Room, say "You emerge back into the Catalogue Room."

Note that "going nowhere" means trying a map connection which is blank, and if no rules intervene then "You can't go that way" is normally printed. Unless "nowhere" is specified, descriptions of going apply only when there is a map connection. So "going from the Musicology Section" would not match if the player were trying to go east from there, since there is no map connection to the east. Similarly, "going somewhere" excludes blank connections.

The places gone "from" or "to" can be specific named regions instead of rooms. This is convenient when there are several different ways into or out of an area of map but a common rule needs to apply to all: so, for example,

> Before going from the Cultivated Land to the Wilderness, ...
> Before going nowhere from the Wilderness, say "Tangled brush forces you back."

Note that it must be "going nowhere from the Wilderness", not "...in the Wilderness". (Note also the caveat that the regions must be named: "going from a region", or something similarly nonspecific, will not work.)

An important point about "going... from" is that, as mentioned in general terms above, it requires that there is actually a map connection that way: whereas "going... in" does not. Suppose there is no map connection north from the Wilderness. Then:

> Instead of going north from the Wilderness, say "You'll never read this."
> Instead of going north in the Wilderness, say "Oh, it's too cold."

The first of these never happens, because it is logically impossible to go north from the Wilderness: but the second does happen. (Technically, this is because "going north" is the action, and "in the Wilderness" a separate condition tacked onto the rule.) This distinction is often useful - it allows us to write rules which apply only to feasible movements.

This may be a good place to mention a small restriction on the ways we can specify an action for a rule to apply to, and how it can be overcome. The restriction is that the action should only involve constant quantities, so that the following does not work:

> The Dome is a room. The Hutch is north of the Dome. The rabbit is in the Hutch. Before going to the location of the rabbit, say "You pick up a scent!"

because "the location of the rabbit" is a quantity which changes in play (the player can pick up the rabbit and take him to the Dome, for instance). However, we can get around this restriction by defining a suitable adjective, like so:

> The Dome is a room. The Hutch is north of the Dome. The rabbit is in the Hutch. Definition: a room is rabbit-infested if it is the location of the rabbit. Before going to a rabbit-infested room, say "You pick up a scent!"

83
| Example Veronica An effect that occurs only when the player leaves a region entirely.

84
| Example Hagia Sophia If the player tries to go a valid direction while on a supporter, make him stand up first; if he tries to go a nonexistent one, print a special refusal.

By default, if the player asks to go some direction while he is sitting down, he'll be told to get up first. If we wanted to make his life a little easier, we might add a rule to do this automatically for him: "Hagia Sophia" Before going somewhere when the player is on a supporter (called the chaise): say "(first getting off [the chaise])[line break]"; silently try exiting. Dome is a room. North of Dome is North Chapel. South of the Dome is South Chapel. West of the Dome is Western End. Quiet Corner is northwest of the Dome, north of Western End, and west of North Chapel. Loud Corner is east of North Chapel, northeast of Dome, and north of Eastern End. Eastern End is north of Dim Corner and east of Dome. Dim Corner is southeast of Dome and east of South Chapel. Ruined Corner is southwest of Dome, west of South Chapel, and south of Western End. The church door is east of Eastern End and west of the Courtyard. The church door is a door. The folding chair is an enterable supporter in the Dome. The folding chair is portable. Test me with "sit on chair / w / e / get chair / w / drop chair / sit on chair / w". Now the player will always get up before trying to walk out of a room; and the fact that we've said "going somewhere" means that this rule will not occur if the direction typed is not valid. We will still get "you'll have to get off the chair" in the cases where the player has typed an invalid command, though, which is undesirable. We could override this too, by adding the following to our scenario: Instead of going nowhere when the player is on a supporter (called the divan): say "Nothing interesting lies in that direction, even if you weren't lazing about on [the divan]." Now "test me" will produce this effect at the very end.

85
| Example A&E Using regions to block access to an entire area when the player does not carry a pass, regardless of which entrance he uses.

86
| Example Polarity A "go back" command that keeps track of the direction from which the player came, and sends him back.

87
| Example Bumping into Walls Offering the player a list of valid directions if he tries to go in a direction that leads nowhere.

Previous | Contents | Next