Game Development Community

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

#1
05/23/2008 (6:14 am)
Do you mean you have an animation already made in TGB & you want to replace it? Just delete the old one & re-name the running one.

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.
#2
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
08/01/2008 (5:08 am)
Http://tdn.garagegames.com/wiki/Torque_2D/GenreTutorials/PlatformerAnimation

That is a detailed tutorial about changing your object's animation.