Flint Particle System Forum - How do I prevent particles fading once reached destination?2011-12-11T23:46:43+00:00http://flintparticles.org/forum/
Lussumo Vanilla & Feed Publisher
How do I prevent particles fading once reached destination?http://flintparticles.org/forum/comments.php?DiscussionID=408&Focus=1398#Comment_13982010-10-06T16:02:16+01:002011-12-11T23:46:43+00:00hectorshttp://flintparticles.org/forum/account.php?u=364
Hiya, I've looked through the examples and can't find how to do this. I'm adding a TweenToZone:
_startEmitter.addAction(new TweenToZone(new BitmapDataZone(__myBitmapData)));
This works great ...
_startEmitter.addAction(new TweenToZone(new BitmapDataZone(__myBitmapData)));
This works great but I want my particles not to disappear when they reach their destination.
What's the best way to do this?
Thanks :)]]>
How do I prevent particles fading once reached destination?http://flintparticles.org/forum/comments.php?DiscussionID=408&Focus=1402#Comment_14022010-10-09T16:16:32+01:002010-10-09T16:17:26+01:00Richardhttp://flintparticles.org/forum/account.php?u=1
The tween is tied to the particle's lifetime. As a result, the particle dies when the tween ends.
However, if you listen for the particle dead event, you can revive the particle and add it to a ...
However, if you listen for the particle dead event, you can revive the particle and add it to a different emitter which doesn't tween it (or kill it). Something like this
stableEmitter = new Emitter2D(); renderer.addEmitter( stableEmitter ); stableEmitter.start();
You can see a more complete example of this in the Logo Tween example.]]>
How do I prevent particles fading once reached destination?http://flintparticles.org/forum/comments.php?DiscussionID=408&Focus=1464#Comment_14642010-12-09T21:15:40+00:002011-12-11T23:46:43+00:00Bob vd Bibshttp://flintparticles.org/forum/account.php?u=444
Hi Richard,
i tried this but the particle still has an alpha of 0 so i cant see it. (or something else is wrong).
Is there a way of getting more control over the lifecycle of the particle? How ...
i tried this but the particle still has an alpha of 0 so i cant see it. (or something else is wrong). Is there a way of getting more control over the lifecycle of the particle? How can i prevent the particle from fading?
tnx]]>
How do I prevent particles fading once reached destination?http://flintparticles.org/forum/comments.php?DiscussionID=408&Focus=1484#Comment_14842010-12-20T07:46:02+00:002011-12-11T23:46:43+00:00Richardhttp://flintparticles.org/forum/account.php?u=1
Set the particle's color when you revive it. The color is a 32bit value, with the first 8 bits (the first FF below) indicating the alpha.
stableEmitter = new Emitter2D();
renderer.addEmitter( ...
stableEmitter = new Emitter2D(); renderer.addEmitter( stableEmitter ); stableEmitter.start();