Author |
Message |
dutchsmoker
Joined: Fri Oct 16, 2009 7:45 pm Posts: 72
|
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 |
|
|
Mad Alex
Joined: Sat Oct 17, 2009 2:07 pm Posts: 127
|
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 |
|
|
dutchsmoker
Joined: Fri Oct 16, 2009 7:45 pm Posts: 72
|
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 |
|
|
Mad Alex
Joined: Sat Oct 17, 2009 2:07 pm Posts: 127
|
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 |
|
|
dutchsmoker
Joined: Fri Oct 16, 2009 7:45 pm Posts: 72
|
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 |
|
|
Duh102
happy carebear mom
Joined: Tue Mar 04, 2008 1:40 am Posts: 7096 Location: b8bbd5
|
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 |
|
|
Shook
Joined: Fri Feb 16, 2007 8:43 pm Posts: 1695 Location: AH SHIT FUCK AUGH
|
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 |
|
|
dutchsmoker
Joined: Fri Oct 16, 2009 7:45 pm Posts: 72
|
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. and a gif of it in action.
|
Mon Oct 04, 2010 6:08 pm |
|
|
Roast Veg
Data Realms Elite
Joined: Tue May 25, 2010 8:27 pm Posts: 4521 Location: Constant motion
|
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 |
|
|
findude
Joined: Tue Dec 12, 2006 3:10 pm Posts: 495 Location: Uncertain quantum state
|
Re: SpriteAnimDuration question.
Yes, a MOSRotating with correctly set lifetime and animation settings will work.
|
Mon Oct 04, 2010 6:33 pm |
|
|
Roast Veg
Data Realms Elite
Joined: Tue May 25, 2010 8:27 pm Posts: 4521 Location: Constant motion
|
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 |
|
|
findude
Joined: Tue Dec 12, 2006 3:10 pm Posts: 495 Location: Uncertain quantum state
|
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 |
|
|
Roast Veg
Data Realms Elite
Joined: Tue May 25, 2010 8:27 pm Posts: 4521 Location: Constant motion
|
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 |
|
|
findude
Joined: Tue Dec 12, 2006 3:10 pm Posts: 495 Location: Uncertain quantum state
|
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 |
|
|
dutchsmoker
Joined: Fri Oct 16, 2009 7:45 pm Posts: 72
|
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 |
|
|
|