and use WalkTo() instead of GoTo() in all your scripts..
I have another idea how to do that by changing the file "game.script" (thinking of script system similar to that used in WME demo).
1. Replace header of mouse event handler from:
on "LeftClick"
to:
function lclk()
2. Add new event handler:
on "LeftClick"
{
actor.WalkAnimName = "walk";
actor.Velocity = 100;
actor.AngularVelocity = 400;
lclk();
}
3. Add handler for double click:
on "LeftDoubleClick"
{
actor.WalkAnimName = "run";
actor.Velocity = 300;
actor.AngularVelocity = 1200;
lclk();
}
Now single and double clicks shares all the (possibly sophisticated) behaviour except of actor's moving speed.
Beware that this trick (as well as that mentioned above) has side effect: if the actor motion is triggered in other way (e.g. by scene startup script) it will use
last-used, not the
default walk style, so we must remember to reset walk parameters in the begining of such action. Unfortunately it cannot be done at the end of doubleclick handler as the "gotos" are nonblocking.