How to reset animation?
by Justin Tolchin · in Torque Game Engine · 03/30/2005 (12:42 pm) · 2 replies
Hi all,
Pretty basic question here (I hope). I have a non-cyclic "fire" animation that I play when I want my character to fire his weapon. I activate it using setActionThread("fire"). It plays fine the first time but when I want to fire the weapon again it won't play. I was stepping through the setActionThread code and I noticed that if it thinks the animation is already playing it just exits:
So I changed the code to pass in "forceSet" as true and now it goes through the entire setActionThread code but it still doesn't play the animation again. How do I get it to actually reset the animation thread? I even tried calling setActionThread("idle") followed by setActionThread("fire") but that didn't work either.
Thanks!
Pretty basic question here (I hope). I have a non-cyclic "fire" animation that I play when I want my character to fire his weapon. I activate it using setActionThread("fire"). It plays fine the first time but when I want to fire the weapon again it won't play. I was stepping through the setActionThread code and I noticed that if it thinks the animation is already playing it just exits:
if (mActionAnimation.action == action && !forceSet)
return;So I changed the code to pass in "forceSet" as true and now it goes through the entire setActionThread code but it still doesn't play the animation again. How do I get it to actually reset the animation thread? I even tried calling setActionThread("idle") followed by setActionThread("fire") but that didn't work either.
Thanks!
#2
They are sufficiently different enough for the RTS-SK implementation that answer from stock TGE owners may serve to confuse you--I know they did me!
04/01/2005 (5:17 pm)
@Justin: I just spent a weekend or so muddling through the RTS-SK animation setup myself, so if you have any further issues, go ahead and open up a topic in the RTS-SK private forums. They are sufficiently different enough for the RTS-SK implementation that answer from stock TGE owners may serve to confuse you--I know they did me!
Torque Owner Justin Tolchin