Chapter 8: Vehicles, Animals and Furniture
§8.1. Bicycles, Cars and Boats; §8.2. Ships, Trains and Elevators; §8.3. Animals; §8.4. Furniture; §8.5. Kitchen and Bathroom
![]() | Contents of The Inform Recipe Book |
![]() | Chapter 7: Other Characters |
![]() | Chapter 9: Props: Food, Clothing, Money, Toys, Books, Electronics |
![]() | Indexes of the examples |
§8.1. Bicycles, Cars and Boats
The vehicle kind in Inform refers to an object which can carry at least one person, but is small enough to fit into a single location:
In the Garden is a vehicle called the motor mower.
We can then apply different rules to a player going somewhere on foot or in the vehicle. Peugeot (a bicycle) is an easy example; No Relation (a car) adds an ignition switch to the vehicle; Straw Boater (a motorboat) gets around areas of lake where travel on foot is not just slower but impossible.
Hover (a sci-fi "hover-bubble") changes the appearance of the landscape when it is seen from inside the vehicle.
See Ships, Trains and Elevators for larger conveyances
![]() | Start of Chapter 8: Vehicles, Animals and Furniture |
![]() | Back to Chapter 7: Other Characters: §7.16. Social Groups |
![]() | Onward to §8.2. Ships, Trains and Elevators |
|
|
|
Suppose we want the player to see a modified room description when he's viewing the place from inside a vehicle. There are several conceivable ways of doing this; the example here shows a rather advanced way, but is very flexible and will let us write all sorts of special cases.
Here's the tricky part, which relies on material from the chapters on Activities and Rulebooks:
Now we've done that, we can write a "rule for describing the interior" of something, which will print whatever we like:
In fact, as a special refinement, we could even say:
And now anything that's beside us in the vehicle will be described during that first paragraph, rather than later on. |
|
Suppose we want the player to see a modified room description when he's viewing the place from inside a vehicle. There are several conceivable ways of doing this; the example here shows a rather advanced way, but is very flexible and will let us write all sorts of special cases.
Here's the tricky part, which relies on material from the chapters on Activities and Rulebooks:
Now we've done that, we can write a "rule for describing the interior" of something, which will print whatever we like:
In fact, as a special refinement, we could even say:
And now anything that's beside us in the vehicle will be described during that first paragraph, rather than later on. |