Animation problem.
by Claude-Alain Fournier · in Torque Game Engine · 01/20/2006 (6:06 am) · 1 replies
Hi all,
I need some help on this one. I have a simple piece of script code that seems pretty straight forward :
function Player::executeAction(%this, %animation, %timer)
{
%this.setActionThread(%animation);
%this.schedule(%timer * 1000, finishAction) ;
}
function Player::finishAction(%this)
{
%this.setActionThread("Root") ;
}
The execute action work well, the animation is Started, fine. After the timer run out the finishAction is called and Root sequence is started.
My problem is that the root never get called. I debuged the engine and
mShapeInstance->setSequence(mActionAnimation.thread,anim.sequence,
mActionAnimation.forward? 0: 1);
is called in player::setActionThread (player.cc). sequence is indeed Root. But the character continue to execute the old action.
Any idea of pointer would be helpfull, I look all around the place and seems not to be able to point the problem.
Thanks.
I need some help on this one. I have a simple piece of script code that seems pretty straight forward :
function Player::executeAction(%this, %animation, %timer)
{
%this.setActionThread(%animation);
%this.schedule(%timer * 1000, finishAction) ;
}
function Player::finishAction(%this)
{
%this.setActionThread("Root") ;
}
The execute action work well, the animation is Started, fine. After the timer run out the finishAction is called and Root sequence is started.
My problem is that the root never get called. I debuged the engine and
mShapeInstance->setSequence(mActionAnimation.thread,anim.sequence,
mActionAnimation.forward? 0: 1);
is called in player::setActionThread (player.cc). sequence is indeed Root. But the character continue to execute the old action.
Any idea of pointer would be helpfull, I look all around the place and seems not to be able to point the problem.
Thanks.
Torque Owner David Dougher
Pariah Games