View unanswered posts | View active topics It is currently Tue Jan 07, 2025 2:00 am



Reply to topic  [ 13 posts ] 
 MOSParticle Animation Problem 
Author Message
User avatar

Joined: Wed Sep 09, 2009 3:16 am
Posts: 3032
Location: Somewhere in the universe
Reply with quote
Post 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
Profile
REAL AMERICAN HERO
User avatar

Joined: Sat Jan 27, 2007 10:25 pm
Posts: 5655
Reply with quote
Post 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
Profile
User avatar

Joined: Tue Jul 21, 2009 4:36 am
Posts: 347
Location: The place where asses go to be bad
Reply with quote
Post 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
Profile
REAL AMERICAN HERO
User avatar

Joined: Sat Jan 27, 2007 10:25 pm
Posts: 5655
Reply with quote
Post 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
Profile
User avatar

Joined: Sun Jul 13, 2008 9:57 am
Posts: 4886
Location: some compy
Reply with quote
Post 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
Profile WWW
REAL AMERICAN HERO
User avatar

Joined: Sat Jan 27, 2007 10:25 pm
Posts: 5655
Reply with quote
Post Re: MOSParticle Animation Problem
Yeah, but MOSRs can't glow.


Tue Apr 13, 2010 3:33 am
Profile
User avatar

Joined: Tue Jul 21, 2009 4:36 am
Posts: 347
Location: The place where asses go to be bad
Reply with quote
Post 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
Profile
User avatar

Joined: Tue Jul 21, 2009 4:36 am
Posts: 347
Location: The place where asses go to be bad
Reply with quote
Post 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
Profile
User avatar

Joined: Wed Sep 09, 2009 3:16 am
Posts: 3032
Location: Somewhere in the universe
Reply with quote
Post 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
Profile
User avatar

Joined: Sun Jul 13, 2008 9:57 am
Posts: 4886
Location: some compy
Reply with quote
Post 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
Profile WWW
User avatar

Joined: Mon Jun 29, 2009 2:40 am
Posts: 610
Location: Deep below The Map of Mars
Reply with quote
Post 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=17465

I hope that's even moderately helpful.


Tue Apr 13, 2010 6:18 am
Profile
User avatar

Joined: Wed Sep 09, 2009 3:16 am
Posts: 3032
Location: Somewhere in the universe
Reply with quote
Post 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
Profile
User avatar

Joined: Sat Mar 28, 2009 2:33 pm
Posts: 718
Reply with quote
Post 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
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 13 posts ] 

Who is online

Users browsing this forum: Google [Bot]


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.045s | 15 Queries | GZIP : Off ]