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

    • CommentAuthorgiraz
    • CommentTimeJul 10th 2009
     
    Hello everybody and thanks for this amazing system.

    Here is my question, how do I tell an emitter to stop creating new particles until I ask it to start again?

    If I write "emitter.pause()" it will also freeze all the existing particles whilst instead I just want the emitter to pause the creation of new particles.

    Thanks
    Riccardo

    p.s. - also is there any way to perform action with particles depending on their age?
    • CommentAuthorRichard
    • CommentTimeJul 11th 2009
     
    Hi Riccardo

    To stop stop creating new particles, stop the emitter's counter -

    emitter.counter.stop();

    Then to start again, resume the counter

    emitter.counter.resume();

    Regarding actions dependent on a particle's age -
    A number of actions, like TweenPosition, Fade, ColorChange, are based on the particle's age. Take a look at the source for any of these for ideas on writing custom actions based on the particle's age.
    • CommentAuthorgiraz
    • CommentTimeJul 13th 2009
     
    Thanks Richard!