View unanswered posts | View active topics It is currently Thu Jan 02, 2025 9:55 pm



Reply to topic  [ 17 posts ]  Go to page 1, 2  Next
 SpriteAnimDuration question. 
Author Message
User avatar

Joined: Fri Oct 16, 2009 7:45 pm
Posts: 72
Reply with quote
Post SpriteAnimDuration question.
i wanted to know how exactly SpriteAnimDuration works . is it like the total time a animation takes?
so taking the specified frames and timing the stuff automatic , or rather the time between frames.

also whats SpriteAnimMode for ?

ive had no luck looking on the wiki.


Mon Oct 04, 2010 1:08 pm
Profile
User avatar

Joined: Sat Oct 17, 2009 2:07 pm
Posts: 127
Reply with quote
Post Re: SpriteAnimDuration question.
It's time between frames in milliseconds

SpriteAnimMode is animation mode. Takes numbers from 0 to 6.
These modes can be set through this parameter.
0 = NOANIM
1 = ALWAYSLOOP
2 = ALWAYSRANDOM
3 = ALWAYSPINGPONG
4 = LOOPWHENMOVING
5 = LOOPWHENOPENCLOSE
6 = PINGPONGOPENCLOSE

Sorry, didn't remember the source of the info about modes... It's somewhere on the forums.
Try searching "SpriteAnimMode", maybe you'll find that topic. It must contain more information about modes.


Mon Oct 04, 2010 1:35 pm
Profile ICQ
User avatar

Joined: Fri Oct 16, 2009 7:45 pm
Posts: 72
Reply with quote
Post Re: SpriteAnimDuration question.
thanks, thats quite usefull.
also i think it picks a random frame if set to 0 or not defined at all, the mode.


Mon Oct 04, 2010 2:19 pm
Profile
User avatar

Joined: Sat Oct 17, 2009 2:07 pm
Posts: 127
Reply with quote
Post Re: SpriteAnimDuration question.
If set to 0, then it stops on the first frame.
If not defined, then it sets to 1 by default.


Mon Oct 04, 2010 2:30 pm
Profile ICQ
User avatar

Joined: Fri Oct 16, 2009 7:45 pm
Posts: 72
Reply with quote
Post Re: SpriteAnimDuration question.
ahh i see , i'm having trouble with muzzle flash animation, but i don't think it was made for the amount of frames i want it to use...
its a 12frame long blunderbuss muzzle flash,with smoke for SFX
but it seems as the animation is random. just showing one frame , or maybe a couple at most.


Mon Oct 04, 2010 2:36 pm
Profile
happy carebear mom
User avatar

Joined: Tue Mar 04, 2008 1:40 am
Posts: 7096
Location: b8bbd5
Reply with quote
Post Re: SpriteAnimDuration question.
Yes, a muzzleflash will show one or two random frames from the animation you provide. It's hardcoded, so there's no changing it, you just have to work around it.


Mon Oct 04, 2010 2:48 pm
Profile
User avatar

Joined: Fri Feb 16, 2007 8:43 pm
Posts: 1695
Location: AH SHIT FUCK AUGH
Reply with quote
Post Re: SpriteAnimDuration question.
Mad Alex wrote:
It's time between frames in milliseconds

Not quite, it's actually how long it takes in milliseconds to go through all frames. As in, if you have 5 frames, each frame will show for 100 milliseconds.

Edit: And that'd be SpriteAnimDuration = 500. Can't believe i actually forgot to mention that. >.>


Last edited by Shook on Mon Oct 04, 2010 6:21 pm, edited 1 time in total.



Mon Oct 04, 2010 2:50 pm
Profile WWW
User avatar

Joined: Fri Oct 16, 2009 7:45 pm
Posts: 72
Reply with quote
Post Re: SpriteAnimDuration question.
Shook wrote:
Mad Alex wrote:
It's time between frames in milliseconds

Not quite, it's actually how long it takes in milliseconds to go through all frames. As in, if you have 5 frames, each frame will show for 100 milliseconds.


so that would be for SpriteAnimDuration = 500.
my initial thought, animation duration.
too bad muzzle flash are hardcoded like that.
i might aswell dump these here then if somebody knows a workaround.
Image
and a gif of it in action.
Image


Mon Oct 04, 2010 6:08 pm
Profile
Data Realms Elite
Data Realms Elite
User avatar

Joined: Tue May 25, 2010 8:27 pm
Posts: 4521
Location: Constant motion
Reply with quote
Post Re: SpriteAnimDuration question.
Actually, could you not have the gun emit an MOSRotating [for example] with a lifetime of however long, when it is fired? Tell me if I'm wrong, but I think it's a workaround.


Mon Oct 04, 2010 6:24 pm
Profile
User avatar

Joined: Tue Dec 12, 2006 3:10 pm
Posts: 495
Location: Uncertain quantum state
Reply with quote
Post Re: SpriteAnimDuration question.
Yes, a MOSRotating with correctly set lifetime and animation settings will work.


Mon Oct 04, 2010 6:33 pm
Profile
Data Realms Elite
Data Realms Elite
User avatar

Joined: Tue May 25, 2010 8:27 pm
Posts: 4521
Location: Constant motion
Reply with quote
Post Re: SpriteAnimDuration question.
I thought as much, but it would be buggy, especially when firing multiple shots at once. There is some lag-potential as well.


Mon Oct 04, 2010 6:44 pm
Profile
User avatar

Joined: Tue Dec 12, 2006 3:10 pm
Posts: 495
Location: Uncertain quantum state
Reply with quote
Post Re: SpriteAnimDuration question.
Using an AEmitter can fix those issues. You can set the maximum amounts of particles to emit, in this case, to 1, invidually per emission.


Mon Oct 04, 2010 7:32 pm
Profile
Data Realms Elite
Data Realms Elite
User avatar

Joined: Tue May 25, 2010 8:27 pm
Posts: 4521
Location: Constant motion
Reply with quote
Post Re: SpriteAnimDuration question.
Would you have to use Lua to attach the emitter, or could it be attached through .ini?


Mon Oct 04, 2010 8:00 pm
Profile
User avatar

Joined: Tue Dec 12, 2006 3:10 pm
Posts: 495
Location: Uncertain quantum state
Reply with quote
Post Re: SpriteAnimDuration question.
No, it would be fired, and the AEmitter would spawn all the shots, and the super-animated muzzleflash.

Stop making it so hard, mate.


Mon Oct 04, 2010 8:49 pm
Profile
User avatar

Joined: Fri Oct 16, 2009 7:45 pm
Posts: 72
Reply with quote
Post Re: SpriteAnimDuration question.
Roast Veg wrote:
Would you have to use Lua to attach the emitter, or could it be attached through .ini?

i think i got it .
take a look at the vanilla uber cannon for a nice example , but there AEmitter is used to get around a mass problem , if i'm correct.


Tue Oct 05, 2010 1:15 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 17 posts ]  Go to page 1, 2  Next

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.031s | 13 Queries | GZIP : Off ]