Flint Particle System Forum - Color change upon particle death2011-12-11T00:40:48+00:00http://flintparticles.org/forum/
Lussumo Vanilla & Feed Publisher
Color change upon particle deathhttp://flintparticles.org/forum/comments.php?DiscussionID=448&Focus=1520#Comment_15202011-01-20T15:26:07+00:002011-12-11T00:40:48+00:00Adzhttp://flintparticles.org/forum/account.php?u=333
So I've been trying to modify the Gravity Well example so that after a certain time, the particles change color but still retain their positions (though they don't have to retain their speed, though ...
import org.flintparticles.common.counters.*; import org.flintparticles.common.initializers.*; import org.flintparticles.twoD.actions.*; import org.flintparticles.twoD.emitters.Emitter2D; import org.flintparticles.twoD.initializers.*; import org.flintparticles.twoD.renderers.*; import org.flintparticles.twoD.zones.*; import org.flintparticles.common.actions.Age; import org.flintparticles.common.events.ParticleEvent; import org.flintparticles.twoD.particles.*;
I thought that lifetime might be the cause of this problem, so i removed lifetime/age and ran a separate timer that kills the particles every 15 seconds, (which triggers the changeColour function) but they just disappear.
Any help would be great :) Thanks]]>
Color change upon particle deathhttp://flintparticles.org/forum/comments.php?DiscussionID=448&Focus=1521#Comment_15212011-01-20T15:32:12+00:002011-12-11T00:40:48+00:00Adzhttp://flintparticles.org/forum/account.php?u=333
Also - I tried changing:
emitter.addExistingParticles( [ event.particle ], true);
to:
emitter.addExistingParticles( [ event.particle ], false);
this results in the particles reviving in ...
emitter.addExistingParticles( [ event.particle ], true);
this results in the particles reviving in the same position, but as they don't have any of the initializers, I think they just just die over and over again instantly. Though I might be able to make that work with some fiddling....hopefully there is an easier way?]]>
Color change upon particle deathhttp://flintparticles.org/forum/comments.php?DiscussionID=448&Focus=1526#Comment_15262011-01-26T04:21:45+00:002011-12-11T00:40:48+00:00Adzhttp://flintparticles.org/forum/account.php?u=333
Solved, I just realised that when the particles revive, Point zone is applied again, but is offset from the particles' current position, rather than an absolute position