- Home /
Turn based game animation through mechanim
We're creating a turn based game in unity 4 and are having some problems with the attack animation, every time a character attacks it just keeps looping over and over. The question is, how do we get it to only play once?
have you checked if the attack animation isn't marked as loopable?
Yeah, loop isn't checked and it's going back to idle but the parameter is still set to true so it plays the animation again. We're using a wait as a work around right now but I was wondering if there is a more elegant solution.
Answer by Chronos-L · Mar 06, 2013 at 04:20 AM
If mecanim animation can use animation event, then you can use an animation event to call a function to modify the value of your parameter.
I have only 2 hours of experience in mechanim, so I am not sure will this technique work or not. It's worth a shot though, it will take only 5-10 minutes to test this.
Your answer
Follow this Question
Related Questions
Playing an Animation only once Unity 4 0 Answers
How to play an animation once, then play another animation right after? 2 Answers
Gettings Animations in LocalSpace (Parenting Not Working) 0 Answers
How to use the imported animations from Maya in the animator controller? 0 Answers
Continuously Play Animation Forwards and Backwards with Mechanim 0 Answers