Flint Particle System Forum - Emitting particles to random points2010-12-26T18:12:01+00:00http://flintparticles.org/forum/
Lussumo Vanilla & Feed Publisher
Emitting particles to random pointshttp://flintparticles.org/forum/comments.php?DiscussionID=223&Focus=822#Comment_8222009-06-18T20:23:17+01:002010-12-26T18:12:01+00:00ianhill090776http://flintparticles.org/forum/account.php?u=212
Hello,
I'm a Flint newbie who's modifying the Firework example. I have a particle that serves as the "firework" before the explosion, and I have the "firework bloom" ...
I'm a Flint newbie who's modifying the Firework example. I have a particle that serves as the "firework" before the explosion, and I have the "firework bloom" post-explosion.
I need to get the firework particle to move to a random (x, -y) point on the stage, where its lifetime will expire and the firework bloom will appear.
I've tried using TweenPosition constructor, but it won't accept Math.random. Any help would be appreciated. Ian]]>
Emitting particles to random pointshttp://flintparticles.org/forum/comments.php?DiscussionID=223&Focus=833#Comment_8332009-06-24T06:09:01+01:002010-12-26T18:12:01+00:00Richardhttp://flintparticles.org/forum/account.php?u=1
Hi Ian
One important feature of Flint is the simplicity of the actions - combining multiple actions creates complex effects but each action class is quite simple. As such, take a look inside the ...
One important feature of Flint is the simplicity of the actions - combining multiple actions creates complex effects but each action class is quite simple. As such, take a look inside the TweenPosition class. It's quite simple, with four getter/setter pairs, a constructor, and a three line update method that actually does the work. Hopefully, from this, you could create your own action to do as you need - changing the constructor to set the endX and endY to random values might be all that's required.