Inform 7 Home Page / Documentation

§3.16. Vehicles and pushable things

Next in the tour of standard kinds is the "vehicle". This behaves like (indeed, is) an enterable container, except that it will not be portable unless this is specified.

In the Garage is a vehicle called the red sports car.

The player can enter the sports car and then move around riding inside it, by typing directions exactly as if on foot: and the story will print names of rooms with "(in the red sports car)" appended, lest this be forgotten.

We have already seen that some things are portable, others fixed in place. In fact we can also make a third sort of thing: those which, although not portable, can be pushed from one room to another with commands like "push the wheelbarrow north". At a pinch, we might just be willing to allow:

The red sports car is pushable between rooms.

But of course this is a property which almost any thing can have, not just a vehicle. (Only "almost" because Inform will not allow a door to be pushable between rooms, in the interests of realism rather than surrealism.)

If we need vehicles which the passenger sits on top of, like a horse or a tractor, the standard "vehicle" kind will not be ideal. However, by loading one of the extensions which comes ready-installed:

Include Rideable Vehicles by Graham Nelson.

...we are provided with two more kinds, "rideable vehicle" and "rideable animal", just right for the tractor and the horse respectively. (As with all extensions, the documentation can be seen by clicking Go on some source which contains the above line, and then turning to the Contents index; or from the Installed Extensions tab of the Extensions panel.)

* See Going by, going through, going with for further ways to customize vehicle behaviour

arrow-up.png Start of Chapter 3: Things
arrow-left.png Back to §3.15. Light and darkness
arrow-right.png Onward to §3.17. Men, women and animals

A journey from one room to another that requires the player to be on a vehicle.

**ExampleDisenchantment Bay 8
Disenchantment Bay: a pushable chest of ice for the boat.

Letting the player see a modified room description when he's viewing the place from inside a vehicle.