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  Mattress King
Adding extra phrasing to the action to PUSH something in a direction.

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

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  Provenance Unknown
Allowing something like PUSH TELEVISION EAST to push the cart on which the television rests.

RB

Suppose we have a series of items that might be stacked on top of one another -- say a heavy television on a rolling cart, and we want the player to be able to move the cart with PUSH TELEVISION EAST just as well as with PUSH CART EAST.

This takes a little redirection, using a setting action variables rule. This is not a kind of rule we've encountered yet, and in fact we won't meet it until the Advanced Actions chapter; it is included here for the convenience of authors who want to modify the effect of pushing without reading that far ahead:

"Provenance Unknown"

Setting action variables for pushing something to:
    if the noun is enclosed by a pushable between rooms thing (called the pushed item) which is in the location:
        now the noun is the pushed item instead.

This rule says that any time we push an object that is on top of a stack of pushable objects, we should transfer the action to the item at the bottom of the stack.

The rest is merely a test case.

The heavy golden idol is on a roller board. The roller board is on a hovercraft.

The hovercraft, the tea trolley, and the skateboard are pushable between rooms.

The hovercraft is in Zeta Proximan Dig Field.

Zeta Proximan Dig Field is a room. "During the day, the field is massed with sweating native workers, overseers, and officials from central command. Now the spades, trowels, brushes, metal detectors, ground probes, plumb lines, and sighting tripods have been laid aside.

All that remains are the trenches and the fine grey dust that blows slowly across them; the moonlight; and the just-emerging outlines of an ancient and alien wall."

The Hover-Road is west of the Dig Field. "A long road hastily laid down, stretching east to west, from the dig site toward the safety of the city."

When play begins:
    say "You have, at last, loaded your illicit cargo without setting off any of the many and sensitive alarms set here; now it remains only to sneak out of the area, under the light of Zeta Proxima's lone green moon."

Test me with "push idol west / look / push roller board east / look".

108
*** 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


PreviousContentsNext