How do you call animations from the script?
by Robert Garrett · in Torque Game Engine · 06/27/2002 (5:54 pm) · 1 replies
Hi there. I'm currently working on a game which incorporates melee fighting and I'm having a little bit of trouble calling my animations. I need to be able to run and swing at the same time, but the only way I've been able to figure out for calling animations from the script is by doing something like this:
moveMap.bindCmd( mouse, button1, "commandToServer
('playCel',\"swing\");", "" );
Now this plays my animation very nicely, but my problem is that evidently "cel" animations are played on the same thread as the run animation, so I can't get them to play at the same time, even though the run and swing animation are using different nodes for the movement. Anyone have some idea how I can call a second thread of animation from the script, or atleast where in the code I can look to alter it so that I can?
Thanks for your time
moveMap.bindCmd( mouse, button1, "commandToServer
('playCel',\"swing\");", "" );
Now this plays my animation very nicely, but my problem is that evidently "cel" animations are played on the same thread as the run animation, so I can't get them to play at the same time, even though the run and swing animation are using different nodes for the movement. Anyone have some idea how I can call a second thread of animation from the script, or atleast where in the code I can look to alter it so that I can?
Thanks for your time
Torque Owner Robert Garrett
function serverCmdSwing(%client)
{
%client.player.setActionThread(swing);
//echo("working");
}
moveMap.bindCmd(mouse, button1, "commandToServer('Swing');","" );
Where 'swing' is the name of my animation. However, I still can't seem to get the Run and Swing animations to run on seperate threads. He swings just fine, but the minute I start running he stops the upper body motion.
Thx for any answers