I’ve created a simple “grenade” type class which is a modification of the “MyProjectile” default blueprint. It spawns an explosion and fire and smoke effect upon impact. I want the smoke and fire to be destroyed after a few seconds though for performance reasons. If I don’t have a delay between the nodes, they get destroyed immediately. But they linger forever with any length of delay in between. Why is this happening? Here’s an SS of my blueprint relevant section:
If those actors are spawning stuff, that stuff won’t be destroyed along with them.
The reason why might be because your destroying the actor that’s responsible for destroying the two particles before it gets chance too. Try hiding your grenade and then destroy it after the particles have been destroyed. Hope this helps.
This is what I thought as well, but even if I disconnect the “Destroy Self” node, the effects still stick around indefinitely.
Can you clarify what you mean by this? Is there a way to accomplish what I’m trying to do?
What you need to do is set up the particle emitters to run for the duration of your explosion, but set them to not loop. Here’s an example of this behavior:
The emitter will run for 1 second, and the destroy itself. You’ll find these settings under the required tab in your particle emitter.
Instead of using a SpawnActor node to spawn an emitter, try Spawn Emitter At Location node designed for particle spawning. It has an auto-destroy property that destroys the emitter when it completes.
Thank you all for your responses! I fortunately was able to achieve the effect I wanted in the same blueprint easily.
Give or take the random integer depending on what you want to achieve. This makes the fire and smoke “burn out” without seeming too predictable. I wanted to keep the actors for this effect as they have sounds as well as animation!