I6: Leaving a Vehicle

Hi all,

if I want to catch a player entering a vehicle I use before[] and Enter:. How do I catch him leaving the vehicle?

Thanks,

Grue

Sorry for pushing this, but I got no clue what’s going wrong. I thought “Exit:” would catch the player, but

Object canoe "canoe" at_the_river
with name 'canoe',
description "A wooden canoe dug out of a trunk of a large tree.  It's about three metres long. Given its primitivity 
		 it looks rather comfortable, with a wooden bench in the back to sit on and loads of space for your legs.
		 Though you're not sure if you know how to operate it professionally, it's probably your only choice to
		 proceed.",
before [target;
  Enter:	print "texttexttext.";
		rfalse;
  Exit:	"TEST";
  Go:		target=location.(noun.door_dir)();
		if(~~(target ofclass River_Room)){
  		  print "doesn't work^";
		  return 2;}
		return 1;
 		],
has enterable static;

has no effect - when I sit in the canoe and type ‘out’, the player just exits the canoe and stands in the middle of the river. What am I doing wrong?

To sucessfully catch an “exit” action when player is inside the boat try using “react_before” instead of “before”, something like:

react_before [; exit: if (player in self) "TEST"; ],

It will require some more polishing, but I think it will finally do.

Doesn’t work either.

Done some debugging. What I don’t understand is - I have a room A and a room B. Both are of class River_Room. My canoe is in room A. In both rooms I give out debug text via before [; Enter: print “TEST”;], Now, if I enter the canoe the debug text is printed. I move to room B and don’t get the debug text, probably because I’m in the canoe. Now I get out of the canoe - no debug text. Now I get back into the canoe - debug text! I’m confused…

EDIT: Okay, found a workaround, probably. before [; Exit: catches my “out” command - in the target room. I don’t know why, but I can make somethig out of it.