Author |
Message |
dragonxp
Joined: Wed Sep 09, 2009 3:16 am Posts: 3032 Location: Somewhere in the universe
|
MOSParticle Animation Problem
Well, i've stumbled onto a problem which i do not know what to do. Whatever i do, the animation on a MOSParticle is fixed, even if i put
SpriteAnimMode = 1 SpriteAnimDUration = [100,200,600,10000, Doesn't seem to make a difference.]
Any Suggestions?
|
Tue Apr 13, 2010 12:50 am |
|
|
Grif
REAL AMERICAN HERO
Joined: Sat Jan 27, 2007 10:25 pm Posts: 5655
|
Re: MOSParticle Animation Problem
MOSParticles are terrible at animating. They are hardcoded (as near as I can tell) to animate across lifetime.
Believe me, I've even tried to get them to animate using forced lua code, and it just doesn't happen.
|
Tue Apr 13, 2010 2:16 am |
|
|
Joe
Joined: Tue Jul 21, 2009 4:36 am Posts: 347 Location: The place where asses go to be bad
|
Re: MOSParticle Animation Problem
While this THEORETICAL method might not work and will most definitely lag, you could try making a lua script that analyzes the MOSParticle's last velocity and position, and then swaps it out with a different particle (the next stage in the animation) of the same velocity at the same position as the last one, but to simply do this over time intervals.
Just a thought...
EDIT: I actually think I'm going to try that now, that sounds intriguing!
|
Tue Apr 13, 2010 2:24 am |
|
|
Grif
REAL AMERICAN HERO
Joined: Sat Jan 27, 2007 10:25 pm Posts: 5655
|
Re: MOSParticle Animation Problem
Actually, that's, uh, not a bad idea, Joe.
You could do it in a much simpler way with mostly .ini; just have the particles gib into the next frame with inheritsvel with no added velocity. Then use a lua based timer to force gib after the correct time delay.
|
Tue Apr 13, 2010 3:08 am |
|
|
Geti
Joined: Sun Jul 13, 2008 9:57 am Posts: 4886 Location: some compy
|
Re: MOSParticle Animation Problem
wouldn't it be just as easy to have a MOSR with GetsHitByMOs off and a custom 1px atom? you could keep it constantly oriented vertically with some easy lua.
|
Tue Apr 13, 2010 3:20 am |
|
|
Grif
REAL AMERICAN HERO
Joined: Sat Jan 27, 2007 10:25 pm Posts: 5655
|
Re: MOSParticle Animation Problem
Yeah, but MOSRs can't glow.
|
Tue Apr 13, 2010 3:33 am |
|
|
Joe
Joined: Tue Jul 21, 2009 4:36 am Posts: 347 Location: The place where asses go to be bad
|
Re: MOSParticle Animation Problem
And how would you add a color changing trail to an MOSR? Correct me if I'm wrong, but you can't actually attach a MOPixel to an MOSR, simply have them emitted/created at the same time and place.
|
Tue Apr 13, 2010 4:06 am |
|
|
Joe
Joined: Tue Jul 21, 2009 4:36 am Posts: 347 Location: The place where asses go to be bad
|
Re: MOSParticle Animation Problem
I somewhat got it working. Pass this along and see how it can be improved. Attachment:
File comment: Complete with fully annotated lua. The gun file is in the ACTORS folder (grafted onto the Blast Test Dummy) and not the Devices folder
test.rte.zip [8.38 KiB]
Downloaded 149 times
|
Tue Apr 13, 2010 4:39 am |
|
|
dragonxp
Joined: Wed Sep 09, 2009 3:16 am Posts: 3032 Location: Somewhere in the universe
|
Re: MOSParticle Animation Problem
Thanks for the replies, looks like i'll have to do it with lua.
|
Tue Apr 13, 2010 4:59 am |
|
|
Geti
Joined: Sun Jul 13, 2008 9:57 am Posts: 4886 Location: some compy
|
Re: MOSParticle Animation Problem
Joe wrote: And how would you add a color changing trail to an MOSR? Correct me if I'm wrong, but you can't actually attach a MOPixel to an MOSR, simply have them emitted/created at the same time and place. You can have trails on MOSParticles now? Or am I missing something crucial about the requirements of this's implementation. If you needed glows you could use an AEmitter instead of a straight MOSR, and have the glow on the flash, or do the boring old "glue a nothitting veryshortlifetime glow to yourself and have its age reset each frame". I'm not saying the recreating MOSParticles thing is invalid, I'm just wondering why being able to do self.Frame = and have is work is less crucial than glows and trails (do they work? cause setting the trail on atoms in an atomgroup doesnt work..)
|
Tue Apr 13, 2010 5:14 am |
|
|
PhantomAGN
Joined: Mon Jun 29, 2009 2:40 am Posts: 610 Location: Deep below The Map of Mars
|
Re: MOSParticle Animation Problem
This is pretty obvious self-promotion, but I made a simple framework-y thing for animating things by swapping through things you spawn. I wanted to animate glows, so that's what it does -- this is pretty intensive at it turns out, so it can look jagged when in motion or on a slower machine. viewtopic.php?f=73&t=17465I hope that's even moderately helpful.
|
Tue Apr 13, 2010 6:18 am |
|
|
dragonxp
Joined: Wed Sep 09, 2009 3:16 am Posts: 3032 Location: Somewhere in the universe
|
Re: MOSParticle Animation Problem
Ok since Grif said Lifetime, I'm assuming he meant the variable which dictates how long it stays. Upon experimenting, I decided a 1000 lifetime would be suitable. However it was still a little slow. So, i tried adding around 6 more frames, and luckily, it worked at an adequate speed.
Thanks guys.
|
Wed Apr 14, 2010 12:53 am |
|
|
lafe
Joined: Sat Mar 28, 2009 2:33 pm Posts: 718
|
Re: MOSParticle Animation Problem
Joe wrote: While this THEORETICAL method might not work and will most definitely lag, you could try making a lua script that analyzes the MOSParticle's last velocity and position, and then swaps it out with a different particle (the next stage in the animation) of the same velocity at the same position as the last one, but to simply do this over time intervals.
Just a thought...
EDIT: I actually think I'm going to try that now, that sounds intriguing! i was just thinking about doing that with glows in English class today!
|
Wed Apr 14, 2010 1:05 am |
|
|
|