View unanswered posts | View active topics It is currently Thu Apr 25, 2024 1:52 am



Reply to topic  [ 5 posts ] 
 Play Animation Once? 
Author Message

Joined: Sun Jul 22, 2012 3:06 pm
Posts: 129
Reply with quote
Post 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 :P


Thu Jan 17, 2013 8:54 pm
Profile
User avatar

Joined: Sun Jan 28, 2007 10:32 pm
Posts: 1609
Location: UK
Reply with quote
Post 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.


Thu Jan 17, 2013 9:45 pm
Profile YIM
User avatar

Joined: Sun May 30, 2010 5:30 am
Posts: 853
Location: Auckland, NZ
Reply with quote
Post 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.


Fri Jan 18, 2013 2:41 am
Profile

Joined: Sun Jul 22, 2012 3:06 pm
Posts: 129
Reply with quote
Post 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?


Fri Jan 18, 2013 6:03 am
Profile
User avatar

Joined: Sun May 30, 2010 5:30 am
Posts: 853
Location: Auckland, NZ
Reply with quote
Post 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.


Fri Jan 18, 2013 8:24 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 5 posts ] 

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.123s | 15 Queries | GZIP : Off ]