Game Development Community

Animation after animation

by Ryan McKenzie · in Torque Game Builder · 01/21/2007 (9:37 am) · 4 replies

By taking samples of code from the "miniPlatform tutorial". I can easily understand how to make my player animate when responding to keys. But what i'm questioning is how could I arrange the code so that (for example)...when i hit the left key my player will play an animation and as soon as thats finished, follow onto a 2nd animation and then loop the 2nd animation. So how can I script these actions??

Ryan

#1
01/21/2007 (3:47 pm)
Use the onAnimationEnd function of the sprite to load the next animation when the first one finishes, and then just have that animation set to loop.
#2
01/22/2007 (3:35 pm)
You can see a sample of onAnimationEnd function in mole.cs in the Whack-a-mole sample ;)
#3
01/22/2007 (4:31 pm)
Thanks for posting good and quick answers :)
#4
01/22/2007 (4:42 pm)
We know you can't be everywhere at once Matt ;)