Creating an enterable vehicle to move from room to room

Hi folks! TADS 3/adv3lite noob here, playing around with my first game and I’m curious if anyone can give me a nudge on how to create a vehicle that the PC can enter and is the only way to get between two rooms, in this case it’s a truck and the rooms are Ohio and SanDiego. So PC should be able to enter truck, then either use a direction command or a drive to command to move the truck from the one room to the other. So far I create the truck in Ohio but the player can’t even enter it (“the truck is not something you can enter”). Or should I drop the idea of a container moving from room to room with the PC in it and instead use a passage of some kind and describe it as a truck?

+ truck: Thing 'truck'
    "It's a beat up 1994 Mitsubishi that stalls every 3 blocks."
    isEnterable = true
    enterable = truckCab

truckCab: Room 'truck cab'
    "You are sitting at the wheel in the cramped cab of the truck."

I’d recommend looking at Learning TADS 3 with adv3Lite (a copy of it is here), in particular “11.4 Vehicles” on page 175. It describes how to build a simple vehicle, something akin to this:

bike: Platform 'bicycle; old battered; bike'
  "It's your old battered bike, still serviceable though. "
  isVehicle = true
  canLieOnMe = nil
  canStandOnMe = nil

(For a car or truck, you probably want to use a Booth rather than a Platform.)

It also describes how to set up travel barriers, to limit where the vehicle may travel.


Welcome to TADS! Agreed, the docs have a lot to offer for common patterns…


Thank you both! I will take a look at that section. I’ve read the first few chapters of the book, probably should have searched for vehicles :slight_smile:

My TADS work is usually confined to weekends so it’s a bit of slow going, but it sure is cool.