Search Unity

Question Simon says...Die Now

Discussion in 'Visual Effect Graph' started by Livealot, May 22, 2021.

  1. Livealot

    Livealot

    Joined:
    Sep 2, 2013
    Posts:
    228
    I have had a lot of success changing the behavior of my graphs by flipping some bool, and changing things like color, velocity, based on that bool.

    I haven't had any luck doing that with the age of the particle. I would like to be able to trigger the Die event somehow, since my scenario spawns additional systems when the original system perishes.

    But if I try to manipulate age in the Update Block, it reaps the entire system, and generates no events for Trigger on Die.

    Maybe this is a feature request, but I'm guessing there's some hack to tell all the active particles in a system, regardless of their current age, that the current frame is a good time to die (and fire the OnDie events).

    To clarify the scenario, imagine a system of fireflies, that blink out of existence after 5 seconds with a tiny spark, and constantly spawn to replace themselves. In the idle state, it appears that fireflies come and go. Now, I'd like to fire an event (or flip a bool in an exposed parameter), and tell all the currently active fireflies to blink out RIGHT NOW.

    How would I do that?