2D Toolkit Forum
2D Toolkit => Support => Topic started by: Tylernocks on May 08, 2013, 06:26:17 am
-
I have a death animation, I want for when it meets its last frame for it to remain on the frame until it get re-called
-
If you set the animation clip loop type to single, thats exactly what will happen - it will stop at the last frame.
-
How do you do that, changing the wrap mode to single reduced it to the one frame only. I want the animation to play but just stop at the last frame and not loop.
-
Apologies. That was a typo. I meant to type Once, not Single.
-
hmmm...seems that didnt work either, I set it to once but it still loops
here's the script
State = CharacterState.Dead;
if (!anim.IsPlaying("Death"))
{
anim.Play("Death");
}
The wrap mode is set to once
-
If you're calling this from Update, your code will restart the animation every time it stops playing... You need to only call Play once when you switch to the CharacterState.Dead state.
-
It worked YES!!!! Best support ever!!!