I'm sure this has been asked before, but I can't figure out the keywords to find it, sorry!
Goal: click "look" on object -> character walks to object, but player can click somewhere else to stop walking to the object -> character says something about object.
Problem: if I use eBlock, the player can't interrupt the walk. If I use eNoBlock, the script continues to run and the character says something before s/he reaches the object. I'm sure the solution uses "character.Moving", but the only example I could find in the manual was:
cEgo.Walk(125, 40);
while (cEgo.Moving) Wait(1);
which won't work becuase the player can't do anything while waiting.
Force him to walk to the point he's at right now (thus-no walking) maybe?
what about something like:
while(cEgo.Moving && !mouse.IsButtonDown(eMouseLeft)) Wait(1);
Havent tested so i might have got some of the syntax wrong.
but the idea is that if you click the mouse the loop will exit.
That does not appear to have any effect, Calin. (The character talks and then walks.) Leaving the part about the mouse button out causes it to mimic eBlock, so something about the mouse button part is ending the loop when it begins, instead of when the mouse is clicked.
It's not supported by AGS natively, but you can use my module for that:
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=36383.msg477380#msg477380
That looks to be exactly what I want, Khris, thanks!