Hi all,
I have a Niagara system that uses two custom modules: one that spawns a new particle based on a Blueprint event (thanks to another answer on here for that ) and another that kills a specific particle, selected by its ID, on a seperate event. The expected result is that I can press one key and spawn particles, and press another to remove them in reverse order.
However, I’m looking for a way to select the last particle spawned. I have so far got the following module that selects the paricle with Niagara ID index ‘3’ and removes that, but with particles if one is removed from that index the next particle spawned wil replace that/reuse the index, meaning the order spawned will not match the order of the particle ID indices. Here is the Scratch Pad:
The Niagara ID object also has a tag, which I presume is unique and may be better to use, but Im looking for a way to get the last particle spawned, and for that to be replaced by the next last particle spawned, so if I were to have 5 particles, I could remove them one by one with the fifth, then the fourth, then third, etc.
Would I need to store the particles created in another array and access that to get their IDs, and manipulate that array (as a User Parameter maybe?) or is there already an existing parameter I could access?
Many thanks