Change animation
by Abhinav Chokhavatia · in Torque Game Builder · 05/23/2008 (3:23 am) · 4 replies
Hello,
This is my first post at this forum. I bought a license of TGB Pro - Indie and it looks great.
I was wondering how do I change the animation of my character.
Say my character is walking , how do I change it to running or jumping?
Any help would be very much appreciated.
Thanks,
~Abhin
This is my first post at this forum. I bought a license of TGB Pro - Indie and it looks great.
I was wondering how do I change the animation of my character.
Say my character is walking , how do I change it to running or jumping?
Any help would be very much appreciated.
Thanks,
~Abhin
About the author
#2
call setAnimation(animation name) on the animated sprite object. Animation name is the name given to the animated sprite in the editor.
07/19/2008 (3:02 pm)
Yes. This required scripting:call setAnimation(animation name) on the animated sprite object. Animation name is the name given to the animated sprite in the editor.
#3
07/19/2008 (3:24 pm)
One of the platformer tutorials on the wiki contains a good example of changing a character's animation based on their current actions.
#4
That is a detailed tutorial about changing your object's animation.
08/01/2008 (5:08 am)
Http://tdn.garagegames.com/wiki/Torque_2D/GenreTutorials/PlatformerAnimationThat is a detailed tutorial about changing your object's animation.
Torque Owner Stephen Howe
Or do you mean you need a new animation of a character walking? You need to make the character run yourself (like in a 3d program, export a running animation).
Or do you mean the character in TGB "walks" but you want to press a key so they can run? Check out the scripting forum for that one.