Object the_taxi "yellow taxi"
with name "taxi" "cab" "yellow" "car",
description "It's a shiny yellow taxicab, with the typical black
checkers on the sides. A glowing light atop the cab
says ~YELLOW CAB~ with a phone number under it.",
before [;
Enter, Go: PlayerTo(lone_taxi);
rtrue;
],
has static;
Object lone_taxi "Taxi Backseat"
with description ....
etc.
So typing "enter taxi" or "go in taxi" will move the player inside of
it. (actually to the room 'lone_taxi'). And, furthermore...
Object lone_taxi "Taxi Backseat"
with out_to [;
if (the_taxi has general && motivated(tdriver) == 1)
"~Hey! Not until you pay,~ declares the taxi driver.";
StartTimer(lone_taxi, 5);
return parent(the_taxi);
],
...etc.
I give the_taxi general after it has driven and the driver needs
payment. Ignore the motivated() routine. It just returns 0 if his mind
is being controlled by the player, else 1. After the player exits the
taxi, the timer starts. In 5 turns, the taxi drives off.
Anyway, before I go too far off the tangent.. that is basically it.
Make an "Enter, Go:" in your before routine, and you can enter the car
with no problem. As far as turning it on and driving it, I leave that
to you. :)
-- --- Sam Hulick ------------- shulick@indiana.edu --------------------- Systems Consultant | Homepage: Indiana College Placement | http://copper.ucs.indiana.edu/~shulick/ and Assessment Center | PGP public key available on request