Wintermute Engine Forum

Wintermute Engine => Technical forum => Topic started by: A.Y. on June 12, 2006, 12:48:39 PM

Title: "LeftDoubleClick"
Post by: A.Y. on June 12, 2006, 12:48:39 PM
I need the actor, on "LeftDoubleClick", executing "actor.SkipTo(Scene.MouseX,  Scene.MouseY);".

/////in scripts\game.script
on "LeftDoubleClick"
{
      Scene.ApplyEvent("LeftDoubleClick");
}

/////in scripts\scene.script
on "LeftDoubleClick"
{
  // when the scene is left-clicked, just send the actor to the specified point
  actor.SkipTo(Scene.MouseX, Scene.MouseY);
}
on "LeftClick"
{
  // when the scene is left-clicked, just send the actor to the specified point
  actor.GoTo(Scene.MouseX, Scene.MouseY);
}

But the actor еxecutes action, and then comes back to performance of the previous action.
What can I correct it?
Title: Re: "LeftDoubleClick"
Post by: Mnemonic on June 12, 2006, 02:30:40 PM
Try calling actor.Reset() before actor.SkipTo(), that should cancel the walking.
Title: Re: "LeftDoubleClick"
Post by: A.Y. on June 16, 2006, 11:09:03 AM
thank you, very much.