Setting animation to arbitrary frame
by Will Burgers · in Torque Game Builder · 11/16/2005 (2:24 pm) · 7 replies
In the game I'm working on right now, I need one sprite to be able to just jump to the frame in it's animation that corresponds to the frame another sprite is at... basically I need to be able to do this do this:
$Sprite2.setAnimationFrame( $Sprite1.getAnimationFrame() );
Except that setAnimationFrame is an unknown command.
Is there such a command that will allow me to jump the animation of a sprite to an arbitrary location?
Thank you for any help,
Will
$Sprite2.setAnimationFrame( $Sprite1.getAnimationFrame() );
Except that setAnimationFrame is an unknown command.
Is there such a command that will allow me to jump the animation of a sprite to an arbitrary location?
Thank you for any help,
Will
#2
11/17/2005 (7:45 pm)
BTW, there's a bunch of functions listed in the reference PDF. You can find some gems in there that you wouldn't otherwise know about. ;)
#3
- Melv.
11/18/2005 (2:58 am)
In the new SDK you can do this exactly as you posted...$sprite2.setAnimationFrame( $sprite1.getAnimationFrame() );
- Melv.
#4
11/18/2005 (10:59 am)
@Melv, Is this just a function rename, or is there different behavior implied here?
#5
- Melv.
11/18/2005 (11:54 am)
Animated sprites never had the ability to set a frame before, only static ones. The "set/getFrame()" calls you mention above only work for static sprites. This is new functionality in v1.1 as previously, you could only start the animation rolling but not change it once it was going.- Melv.
#6
11/18/2005 (2:08 pm)
I never knew it didn't work for animated sprites, good to know.
Torque 3D Owner Luke D
Default Studio Name