Game Development Community

Need help with animations

by Jermaine Morgan · in Torque Game Engine · 05/22/2008 (2:47 pm) · 2 replies

What I'm trying to do is when my player collides with a ai player, The AI player uses the "dead" animation.

Here is what I put at the end of the aiplayer file.

function PlayerBody::onCollision( %this, %obj, %col )
{
%obj.playThread(0, "Dead");
}

I am new to animations. So I'm figuring I use this code because it is saying tha when the Player collides with the Ai player, the ai player should switch to dead animation.

But its not working its not doing anything at all.

I am using fps starter kit.

Can anybody help?

#1
05/22/2008 (4:49 pm)
You should probably first check if your onCollision callback is even getting called. Set a breakpoint on it in Torsion or at least add an echo like...

....onCollision(...)
{
echo( "onCollision hit!" );
%obj.playThread(0,"Dead");
}
#2
05/22/2008 (6:14 pm)
Thanks for the reply

yep it getting called but nothing is happening..

hmm.
Any help ?