I'm trying to script this behaviour:
1) you click on an object with any action cursor
2) the character starts walking there
3) On its way it steps on a walking area that has a "standing on" event.
4) I want that the character immediately starts walking back, and doesn't do any of the things he'd have done if he had reached the object.
I'm almost there.
But after the character comes back, he still performs the actions queued by the interaction attached to the object.
In particular, if I use "look at", then he starts walking, then stops when he hits the special walk area, then walks back then he DOES say "that object has nothing special about it".
How do I dump all queued actions as soon as the character walks on the trigger walk area?
Using a Boolean true/false condition would be an idea.
The short answer is: you can't.
The solution is to not call the interaction events unless the character reaches their goal.
It's exactly what I have written my GotThere module (http://www.adventuregamestudio.co.uk/forums/index.php?topic=36383.msg477380#msg477380) for.
Edit:
I'm guessing this is for the Indy game, right? My module is written for the standard sierra cursors, but it's easily adaptable.
The basic idea is:
In the interaction, instead of directly calling stuff like "you open the box", send the player to the coordinates. Unless that is, they have already reached them.
In the function that sends them off, store the location and cursor mode in global variables. As soon as the character has reached the goal (i.e. as soon as player x,y == target x,y), call the interaction again.
Thanks for the answers.
I'll see if I need to adapt your module or if a simple boolean will do the trick (it's for a small room with few interactions)