| Chapter 3: Things |

| 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 game 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.)

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

Let's say that our protagonist is about to flee . Obviously, he can't make the journey on foot; he needs transportation. "Peugeot" Include Rideable Vehicles by Graham Nelson. The Lot is a room. The ten-speed bike is a rideable vehicle in the Lot. We make the ten-speed bike a rideable vehicle because we want to say that the player is on it rather than in it. Then our other room: Cambridge is east of the Lot. And now we borrow from the Actions chapter to prevent travel without the proper equipment: Instead of going to Cambridge when the player is not on the ten-speed bike: say "It's a long journey to Cambridge: you'll never make it on foot." After going to Cambridge: say "You begin pedalling determinedly."; continue the action. Test me with "e / get on ten-speed bike / e".

25
| Example Disappointment Bay 8 Disappointment Bay: a pushable chest of ice for the boat.

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

Previous | Contents | Next