Noob needs help
by Navarre Dickson · in General Discussion · 12/05/2011 (4:53 pm) · 2 replies
Hello,
I just got torque 2d and I read through the tutorial about the fish game. It shows how to assign certain functions to w,a,s,d. I want to do something similar, but I want the sprite animation to change depending on the direction and I can't simply reflect it like in the fish example. I can't figure out how to switch my existing object (Animation1) into another object(Animation2) in a function. Do I want to replace the existing object with another or is there a way to use one image map and have dynamic animations made depending on the cells required?
I'm sorry if this thread exists, but at this point I'm not quite sure how to word what I'm looking for.
I just got torque 2d and I read through the tutorial about the fish game. It shows how to assign certain functions to w,a,s,d. I want to do something similar, but I want the sprite animation to change depending on the direction and I can't simply reflect it like in the fish example. I can't figure out how to switch my existing object (Animation1) into another object(Animation2) in a function. Do I want to replace the existing object with another or is there a way to use one image map and have dynamic animations made depending on the cells required?
I'm sorry if this thread exists, but at this point I'm not quite sure how to word what I'm looking for.
#2
12/06/2011 (7:16 am)
Thank you. I got it working before, but I used someones code I found using behaviors which is slightly ahead of where I am so I don't quite understand all his code. This is very helpful.
Employee Michael Perry
ZombieShortbus
Just swap YourObject for the name of your object and %animationName for the actual animation.