I’m probably trying to be too complicated for my first attempt at using Inform, but I found the ability to use cars and ignition switches in those cars so I implemented it in my game. I copied the code from the No Relation example but my car won’t start and subsequently won’t go anywhere.
Here’s what I’ve entered to define the device etc:
[code]A road is a kind of room. Definition: a room is offroad if it is not a road. Instead of going by a vehicle (called the auto) to somewhere offroad:
say “You can’t drive [the auto] off-road.”
An auto is a kind of vehicle. The ignition is a device. The ignition is part of an auto. Instead of going by auto when the ignition is switched off: say “I gotta start the thing first.” Instead of switching on an auto, try silently switching on the ignition. Instead of switching off an auto, try silently switching off the ignition. Understand “start [something]” or “turn on [something]” as switching on. [/code]
And here is how I have implemented it on my road:
[code]The Edsel is an auto in Seventh Street. The description is “It’s too bad these never caught on. They were good looking cars.”
Understand “car” or “jalopy” or “rust bucket” as Edsel.
Instead of going anywhere but south from Seventh Street when the player is not in a vehicle: say “I’m not walking home in this monsoon. My sweet ride better start tonight.” Instead of going west by the Edsel, say “Reverse gear hasn’t worked since I tried to teach that brunette how to speed shift. Luckily home is straight ahead.”
After exiting from the Edsel: say “Your poor car gives one last backfire before settling down to sleep.”[/code]
I have a number of problems here and maybe they are too many for one topic.
The main issue is the ignition. I get no errors from the compiler but when I try to start the car I get this:
The second problem is I can go where ever I want when not in the car despite the “anywhere but south” rule.