Wintermute Engine Forum

Wintermute Engine => Technical forum => Topic started by: BorisC on August 13, 2006, 11:58:47 AM

Title: Clicking on character cause endless walk.
Post by: BorisC on August 13, 2006, 11:58:47 AM
I have my.x character with walk and idle animations.
This one was made by modifying original. trimity.x
For now my character plays idel when just standing and walk when I click somewhere. So, everything is fine, but...
When I click on myself charancer become walk on same place. And there is no way to stop him.
What I did wrong ?
Title: Re: Clicking on character cause endless walk.
Post by: Mnemonic on August 14, 2006, 10:50:14 AM
It's hard to tell if we don't know what code you're calling when you click the character. What's in the on "LeftClick" {} handler of your actor's script?
Title: Re: Clicking on character cause endless walk.
Post by: BorisC on August 14, 2006, 11:14:39 AM
It's old tirnity.script as I mentioned before :)
So, for LeftClik we have
on "LeftClick"
{
  actor.PlayAnimChannelAsync(1, "walk");
}

But how to force character to play animation walk when moving by click ?
Title: Re: Clicking on character cause endless walk.
Post by: Mnemonic on August 14, 2006, 02:22:05 PM
Well the "walk" animation is used automatically when the character is walking. I'm not sure what you're trying to achieve with the above code...?
Title: Re: Clicking on character cause endless walk.
Post by: BorisC on August 14, 2006, 03:07:46 PM
I try to achieve "nothing" when I click on character itself ;)
Title: Re: Clicking on character cause endless walk.
Post by: Mnemonic on August 14, 2006, 03:59:02 PM
Then delete the on LeftClick handler :)
Title: Re: Clicking on character cause endless walk.
Post by: BorisC on August 14, 2006, 04:14:15 PM
Shame on me ;(
I though this handler calls for animation when I click somewhere ;(