Game Development Community

SetActionThread issues

by Univ.of Central Florida (UCF_003 · in Torque Game Engine · 07/28/2006 (6:32 pm) · 4 replies

Hey guys! I've been working rather tirelessly lately to get some animations working for my main player character and reguardless of what I seem to try, I'm not getting anywhere.

OK, here's what's going on.

I am using $player.setActionThread("attackLow"); to start an animation to play. It is cyclic because as long as the player is holding the button down, it will continue to loop. However, I want it to stop when the player lets off of the button. The problem is that it will not stop until the player moves and the engine over-rides it into the run animation.

I attempted to also try a play/stopThread but that will cause the animation to pause at the last frame and sit there until the player moves.

I even tried to make a non-cyclic animation and just schedule a new play after the first animation is complete but this just doesn't seem to solve my problems.

The ideal solution would be a way to stop a cyclic thread that was set into motion by a setActionThread. Is this possible?

Thank you in advance for your help.

#1
07/28/2006 (8:30 pm)
Also, I have attempted to setActionThread on the root animation after the player has let off of the attack key to attempt to override the attack animation and set back to root since that is what teh engine seems to do automatically when the player starts walking (with the walk animation). However, this doesn't work either
:(
#2
07/29/2006 (4:31 pm)
OK, so I finally decided to not call these animations in script and to call them directly using the pickActionAnimation function in player.cc and it works now. Nevermind this post. :) Thank you.
#3
07/29/2006 (5:22 pm)
Well i'm interested in the code :)

I'll be doing alot of animation setting in time, how's it work?
#4
07/30/2006 (12:23 pm)
I would be interested in the code to.