Flint Particle System Forum - How do I make particles fade in quickly without affecting other params? Tue, 13 Dec 2011 12:30:15 +0000 http://flintparticles.org/forum/ Lussumo Vanilla 1.1.10 & Feed Publisher How do I make particles fade in quickly without affecting other params? http://flintparticles.org/forum/comments.php?DiscussionID=301&Focus=1046#Comment_1046 http://flintparticles.org/forum/comments.php?DiscussionID=301&Focus=1046#Comment_1046 Fri, 15 Jan 2010 01:43:22 +0000 michaelk
I am trying to create a steam effect. I would like the particles to fade in quickly but then follow a aging process similar to smoke. I tried using the TwoWay modifier but it affected all the actions. Is there another way to accomplish this? Thanks in advance for any ideas!

Here is the code I'm working with:

import org.flintparticles.common.actions.*;
import org.flintparticles.common.counters.*;
import org.flintparticles.common.displayObjects.RadialDot;
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.energyEasing.*;


var wrap_steam:Emitter2D = new Emitter2D();
wrap_steam.counter = new Steady( 10 );

wrap_steam.addInitializer( new Lifetime( 3, 7 ) );
wrap_steam.addInitializer( new Position( new LineZone( new Point( -40, 0 ), new Point( 40, 0 ) ) ) );
wrap_steam.addInitializer( new Velocity( new RectangleZone(-10, -30, 10, 0 )) );
wrap_steam.addInitializer( new SharedImage( new RadialDot( 3 ) ) );

wrap_steam.addAction( new Age( ) );
wrap_steam.addAction( new Move( ) );
wrap_steam.addAction( new LinearDrag( 0.01 ) );
wrap_steam.addAction( new ScaleImage( 2, 20 ) );
wrap_steam.addAction( new Fade( .1, 0 ) );
wrap_steam.addAction( new RandomDrift( 20, 20 ) );

wrap_steam.x = 100;
wrap_steam.y = 180;
wrap_steam.start( );

var renderer3:BitmapRenderer = new BitmapRenderer( new Rectangle( 0, 0, 200, 200 ) );
renderer3.addEmitter( wrap_steam );
addChild( renderer3 ); ]]>
How do I make particles fade in quickly without affecting other params? http://flintparticles.org/forum/comments.php?DiscussionID=301&Focus=1049#Comment_1049 http://flintparticles.org/forum/comments.php?DiscussionID=301&Focus=1049#Comment_1049 Sat, 16 Jan 2010 20:11:34 +0000 Richard Flinteroids tutorial includes creating custom Actions. ]]>