Animation
by Howard Dortch · in Torque Game Engine · 06/04/2004 (4:27 am) · 3 replies
I would like to know how I assign an animation to a given action. I looked in the player directory and I can see the *.dsq files, I see where they are being loaded in the code, but I dont see the connection point of when I make the character move forward it plays the run animation.
#2
// The first five are selected in the move
RootAnim,
RunForwardAnim,
BackBackwardAnim,
SideLeftAnim,
// These are set explicitly based on player actions
FallAnim,
JumpAnim,
StandJumpAnim,
LandAnim,
What if I have a custom animation I want to run from the script? Do I have to modify the c++ code for each anim?
06/04/2004 (9:14 am)
Do you mean this?// The first five are selected in the move
RootAnim,
RunForwardAnim,
BackBackwardAnim,
SideLeftAnim,
// These are set explicitly based on player actions
FallAnim,
JumpAnim,
StandJumpAnim,
LandAnim,
What if I have a custom animation I want to run from the script? Do I have to modify the c++ code for each anim?
#3
To run a custom animation ( once exported, etc. ) you can use the setActionThread() command for player Objects or PlayThread() for other shapeBase objects ( items ).
But I advise you to stick to the default names ( run, root, etc. ) since they are automatically handled and may override your animation.
06/04/2004 (12:21 pm)
Yes, those are the animations.To run a custom animation ( once exported, etc. ) you can use the setActionThread() command for player Objects or PlayThread() for other shapeBase objects ( items ).
But I advise you to stick to the default names ( run, root, etc. ) since they are automatically handled and may override your animation.
Torque Owner Bruno Grieco
The player.cc code in the engine assings those animations to their proper player state. Ie. if the player stops it runs the root anim, if the player falls it runs the fall anim and so on.
HTH