Game Development Community

Script triggered cel animations

by Sam Horton · in Torque Game Engine · 02/23/2006 (7:03 am) · 1 replies

* I wasn't sure if I should have posted this in the private forums so here goes:


I'm attempting to fire off an attack animation from script and I have everything set up using the obj.playCelAnimation() function. My problem is that I'm having trouble finding a handle to the player object. I'm still using the tutorial.base as opposed to the starter.fps as I think fps has way more than I need to worry about right now.

I'm trying to do something like this in defaultBind.cs

function doBash(%val)
{
   //playerHandle.playCelAnimation(bash);//how can I get the handle to the player?
   echo("BASH");
}
//trigger bash animation
moveMap.bind( keyboard, r, doBash );


from the documentation I also found a player function called setActionThread() that looked like it might be what I'm looking for.

#1
02/23/2006 (7:22 am)
Already gave you an fix, in the future DO NOT double post