#OBJECT car "car" Car_Park
with name "car",
before [;
Lock, Unlock:
give self ~open;
rfalse;
Enter, Exit:
give self open;
rfalse;
],
with_key car_key,
has static container enterable switchable lockable;
The reason for the before routine is that I don't want to bother with `OPEN
CAR' or `CLOSE CAR'. That happens automatically when you enter\exit or
lock\unlock it.
The problem comes when the player is in the car and types `EXIT'. The game
ignores the before and says something like `You can't because the car is
closed'. Perversely, when one types `GET OFF CAR' it works. I think this is
because GetOff calls Exit if noun = parent(player). So surely I should be
able to emulate this by using LibraryMessages with
before [;
Exit: noun = parent(player); rfalse;
];
But no, this won't work either. Help! What's the problem?
-- Jools jools@arnod.demon.co.uk