Fork me on GitHub
Not signed in (Sign In)

Welcome, Guest

Want to take part in these discussions? Sign in if you have an account, or apply for one below

    • CommentAuthorAchtung
    • CommentTimeApr 4th 2010
     
    Heya, I've just recently started out with Flint. I've followed some tutorials but still am struggling with something that, at least I would think, should be very simple.

    How would I speed up particles?

    I have an Emitter class that handles snow particles. Inside the class I have the following function:


    public function setSpeed(nValue:int):void
    {
    nSpeed += nValue;

    //addInitializer( new Velocity( new PointZone( new Point( 0, nSpeed) ) ) );
    //addAction(new Accelerate(0, nSpeed));

    for (var i:int = 0; i < particles.length; i++)
    {
    particles[i].velY = nSpeed;
    }
    }

    Tried things back and forth but not getting a desirable result. I am calling the setSpeed function from a Background class; when it speeds up so should the particles. Is there not a way to update all particles in the Emitter on the spot with a given value?

    Thanks in advance.
    • CommentAuthorAchtung
    • CommentTimeApr 5th 2010
     
    Nevermind this one; got it all working.
    • CommentAuthorRichard
    • CommentTimeApr 6th 2010
     
    Glad you got it sorted. Your solution might be useful to others, if you have the time to post it here.
    Thanks
    Richard