Chapter 7: Basic Actions
7.14. Going by, going through, going with

Adding to the previous example game, we apply rules which depend on travelling by a particular vehicle:

The book trolley is in the Musicology Section. "The book trolley, a sort of motorised tractor for trundling around through the stacks, is parked here." The trolley is a vehicle. Instead of going nowhere by the trolley, say "Don't go crashing the trolley into walls."

Instead of going to the Front Stacks by the trolley, say "The Front Stacks are far too confined for the trolley to manoeuvre into them."

And, lastly, rules which apply to movements through particular doors:

The green baize door is east of the Catalogue Room and west of the Clerk's Office. The green baize door is an open door.

Before going through the green baize door, say "Through you go..." After going through the green baize door: try looking; say "...and here you are."

(Note that these apply whether the action is "going east" or "entering the green baize door", each having the same effect.) The last rule is worth a second look: the normal way that a "going" action is reported is to produce the room description of the new location. So if an "after" rule stops the action before we get to reporting, we have to produce any room description by hand (hence the "try looking" to cause the looking action). Alternatively, we could simply say something and let the normal course of events take place:

After going through the green baize door: say "...and here you are:"; continue the action.

Finally, going is an action which can also happen while the player is pushing something from one room to another, and we can describe this like so:

Instead of going from the Office with the trolley, say "But it looks perfectly placed here. Why push any further?"

"Going" is not the only action which moves the player. Another is "exiting", an action which moves the player out of whatever he/she is currently in or on. This action is often caused by the player typing just OUT or GET DOWN, and there's no noun as such. But Inform allows the syntax "exiting from" to make it easier to write rules about the exiting of particular containers or supporters:

After exiting from the Mini Cooper:
    say "You painstakingly unpack your limbs from the tiny car."


104
* Example  No Relation
A car which must be turned on before it can be driven, and can only go to roads.

RB

We need to designate certain rooms as roads. Since the status of being a road will not change during play, we do this with a kind:

"No Relation"

A road is a kind of room. Definition: a room is offroad if it is not a road.

Instead of going by a vehicle (called the auto) to somewhere offroad:
    say "You can't drive [the auto] off-road."

Trafalgar Square is a road. "The Square is overlooked by a pillared statue of Admiral Lord Horatio Nelson (no relation), naval hero and convenience to pigeons since 1812."

The National Gallery is north of Trafalgar Square. The Strand is east of Trafalgar Square. The Strand is a road.

The car is a vehicle in Trafalgar Square. The ignition is a device. The ignition is part of the car. Instead of going by the car when the ignition is switched off: say "The ignition is off at the moment." Instead of switching on the car, try switching on the ignition. Instead of switching off the car, try switching off the ignition.

Test me with "get in car / n / e / turn on car / n / e / get out / w / n / s / e / get in car / turn off car / w / turn on ignition / w".

(In the course of the writing of Inform 7, much of Trafalgar Square was pedestrianised, making this example already out of date.)

A further technical note: notice "going by a vehicle" in the above rule, rather than "going by something". A rule such as "Instead of going by something..." will be matched whenever the player tries to go some direction while in an enterable object, whether or not that object is actually capable of movement. This is sometimes useful, but in this case we want the warning to apply only when the player is in a vehicle; if we added Trafalgar Square's statue bases to the scenario, we would not want

You can't drive the pedestal off-road.

So we restrict the rule to "Instead of going by a vehicle..."

105
* Example  Mattress King
Adding extra phrasing to the action to PUSH something in a direction.

RB
106
** Example  One Short Plank
A plank bridge which breaks if the player is carrying something when he goes across it. Pushing anything over the bridge is forbidden outright.

RB
107
*** Example  Zorb
Replacing the message the player receives when attempting to push something that isn't pushable, and also to remove the restriction that objects cannot be pushed up or down.

RB
108
*** Example  Provenance Unknown
Allowing something like PUSH TELEVISION EAST to push the cart on which the television rests.

RB


PreviousContentsNext