8.1. Bicycles, Cars and Boats

| Chapter 8: Vehicles, Animals and Furniture |

| 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

47
| Example Straw Boater Using text properties that apply only to some things and are not defined for others. |
WI

Sometimes we like to give properties to kinds of thing, but not fill them in in all cases. For instance, we might have vehicles that optionally make noise, and those might have a "movement sound". All properties have a default value, which we can find by looking in the Kinds tab of the index. This is what the property will be set to automatically, if we do not change it ourselves. In the case of a text property, that is ""; so for instance we might use our movement sound thus: "Straw Boater" Boathouse is a room. "A boathouse circa 1915, which -- though in poor repair -- still suggests Sunday afternoon jaunts taken by women in white gowns and men in straw hats." North of the Boathouse is the Shallow Water. The description of Shallow Water is "Just south is the boathouse, and beyond it are trees and the marble terrace of the house above. The water deepens to the north." North of Shallow Water is Deep Water. The description of Deep Water is "From here the boathouse has dwindled invisibly to the south, and you have a broad panorama of the shoreline, all the way down to the Skeleton Point Lighthouse in the southeast." A vehicle has some text called the movement sound. The sailboat and the motorboat are vehicles in the Boathouse. The movement sound of the motorboat is "VRRRROOOMMMM..." Understand "boat" as the sailboat. Understand "boat" as the motorboat. Note that we haven't given the sailboat any movement sound at all. After going somewhere by a vehicle (called cart): if the movement sound of the cart is not "", say "[the movement sound of the cart][paragraph break]"; continue the action. Instead of exiting when the player is in a vehicle and the location is not the Boathouse: say "You're not dressed for a swim." Instead of going somewhere when the player is not in a vehicle: say "You'd rather not try to make this journey by swimming alone." Test me with "n / get in sailboat / n / get out / s / get in motorboat / n / n".

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

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

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

Previous | Contents | Next