Game Development Community

Attack animation and applyImpulse do not like each other...

by Stephane Conde · in Torque Game Engine · 09/10/2004 (1:38 pm) · 3 replies

My goal is to a) have a character stop moving, b) play an attack animation and c) move in the direction he is attacking.

I have got both a) and b) working. I simply use the function:
%player.setMaxSpeed(0.0, 0.0, 0.0) to stop movement and then use
%obj.setArmThreadPlayOnce(%attack.seqName) to have the attack play out.

The problem is with part c), trying to get the player to move in the direction he is attacking. I am currently using the %obj.applyImpulse(...) function to push the player in the direction he is facing, but I am having problems with this. When the force is applied, the player does move forward, but his run animation also plays which interferes with the attack animation.

Basically, I am looking for a way to move the player forward that doesn't play the run animation, or a way to use the applyImpulse(...) function but then stop the run animation from playing...

By the way, blend animations are not an option as the attack is a full body animation, which prohibits it from blending with a run (or anything else really...)

Thank you very much in advance for you help!

#1
09/10/2004 (7:12 pm)
I would move the player in the updatemove function.
#2
09/15/2004 (6:04 am)
If you set the sequence priority of the attack animation higher than the run animation, it will not interfere. You can set the sequence priority in 3D studio max under the properties of the sequence helper object.
#3
11/25/2004 (3:53 pm)
Yep, that worked Eric... thanks a bunch!