Hello everyone!
This is my first post, so I apologize if I don’t follow convention.
In my blueprint, I have an Array of Niagara Particle Effects. I have the ability to add to the array by keypress, and it spawns more effects in the desired fashion. They are of type .
What I would like to do is, in a separate callable function of my blueprint class, delete all the references, along with the spawned object, from the game. Is there a way to do this?
Also, is there a way I can access the current value in the Niagara actor’s parameters? My Niagara object has two public values; although I can set them easily with Set Niagara Variable, I cannot figure out a way to retrieve the value currently in the object.
Thanks!
For anyone following up on this:
To delete actors from an array, use the ‘Reverse For Each Loop’ and just drag the item element into the ‘Delete Actor’ node. Make sure to use an ‘Is Valid’ node before hand, though.
Still no solution to access parameter values.
For the delete part your Reverse For Each plus Is Valid approach is the right shape since you remove while you iterate. For the read part keep a mirrored copy of the two values in your Blueprint each time you set them, so you always have the current value without querying the system.
you can also try Expose Niagara Variables to Blueprint and C++, it reads Niagara parameters at runtime with Get nodes: Expose Niagara Variables to Blueprint & C++ — Set Niagara Parameters at Runtime | Fab