Data Realms Fan Forums
http://45.55.195.193/

SpriteAnimDuration question.
http://45.55.195.193/viewtopic.php?f=1&t=19859
Page 1 of 2

Author:  dutchsmoker [ Mon Oct 04, 2010 1:08 pm ]
Post subject:  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.

Author:  Mad Alex [ Mon Oct 04, 2010 1:35 pm ]
Post subject:  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.

Author:  dutchsmoker [ Mon Oct 04, 2010 2:19 pm ]
Post subject:  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.

Author:  Mad Alex [ Mon Oct 04, 2010 2:30 pm ]
Post subject:  Re: SpriteAnimDuration question.

If set to 0, then it stops on the first frame.
If not defined, then it sets to 1 by default.

Author:  dutchsmoker [ Mon Oct 04, 2010 2:36 pm ]
Post subject:  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.

Author:  Duh102 [ Mon Oct 04, 2010 2:48 pm ]
Post subject:  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.

Author:  Shook [ Mon Oct 04, 2010 2:50 pm ]
Post subject:  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. >.>

Author:  dutchsmoker [ Mon Oct 04, 2010 6:08 pm ]
Post subject:  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

Author:  Roast Veg [ Mon Oct 04, 2010 6:24 pm ]
Post subject:  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.

Author:  findude [ Mon Oct 04, 2010 6:33 pm ]
Post subject:  Re: SpriteAnimDuration question.

Yes, a MOSRotating with correctly set lifetime and animation settings will work.

Author:  Roast Veg [ Mon Oct 04, 2010 6:44 pm ]
Post subject:  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.

Author:  findude [ Mon Oct 04, 2010 7:32 pm ]
Post subject:  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.

Author:  Roast Veg [ Mon Oct 04, 2010 8:00 pm ]
Post subject:  Re: SpriteAnimDuration question.

Would you have to use Lua to attach the emitter, or could it be attached through .ini?

Author:  findude [ Mon Oct 04, 2010 8:49 pm ]
Post subject:  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.

Author:  dutchsmoker [ Tue Oct 05, 2010 1:15 pm ]
Post subject:  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.

Page 1 of 2 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/