Data Realms Fan Forums http://45.55.195.193/ |
|
Play Animation Once? http://45.55.195.193/viewtopic.php?f=1&t=45077 |
Page 1 of 1 |
Author: | Corpsey [ Thu Jan 17, 2013 8:54 pm ] |
Post subject: | Play Animation Once? |
Anyone know how to get a sprite to play through once and then stop at the last frame instead of repeating indefinitely? I.e. I have a projectile (as an AEmitter, because it's self-propelled) that, after shot, plays through an animation. It does play, but it keeps repeating 0~12. I tried making the (AEmitter) shot null and attaching an AddEffect = Attachable and it doesn't seem to play at all (stays at frame 0). Not to mention the other glaring side effect of the projectile passing through drop ships (even though the attachable is HitsMOs = 1, and Military Stuff). So.. anyone know how to do this? If you'd like I can attach the file so you can mess with the animation. FirstMod.rte (24kb) The V2 ini is the one where the animation repeats.. all it does differently is use the animation as the AEmitter's sprite. Yeah, the offsets are dreadful; because I still need to sprite a new launcher, I haven't move anything around yet. I use FirstMod.rte as a testing folder, so the ModuleIcon is from that older tutorial with the deagle sill |
Author: | Arcalane [ Thu Jan 17, 2013 9:45 pm ] |
Post subject: | Re: Play Animation Once? |
The relatively obscure SpriteAnimMode setting doesn't seem to support a 'Play Once' type function, but what you could try doing is either a simple script (disclaimer: I have no idea if that'll work or not) on the item that sets the sprite during the Create and Update events, or if you don't feel like getting scripting involved, have the projectile animate and last just long enough to emit a static/non-animated copy when its animation cycle completes, which coincides with the original object disappearing into thin air. |
Author: | Major [ Fri Jan 18, 2013 2:41 am ] |
Post subject: | Re: Play Animation Once? |
There is a play once version, there are a few wierder ones aswell. The APC from the EDV uses the one playthrough. |
Author: | Corpsey [ Fri Jan 18, 2013 6:03 am ] |
Post subject: | Re: Play Animation Once? |
The second script is random.. why is the else self.Frame = 0? Is there even a frame 0? Hmm is it because I'm trying to apply the Lua to an AEmitter that they're not working? I'm surprised that AEmitter doesn't reject SpriteAnimMode in the INI considering it doesn't actually change anything. I'm at the point where I don't even want to rearrange it so the sprite is an MOSRotating with attachables, because if it doesn't work then I'll just have wasted more time.. Where is the APC using play once? |
Author: | Major [ Fri Jan 18, 2013 8:24 am ] |
Post subject: | Re: Play Animation Once? |
The APC uses the play once feature to display a picture of the APC in the craft buy menu, then changes to a drop crate sprite. |
Page 1 of 1 | All times are UTC [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |