How can I destroy an emitter that I'm not storing as a variable?

Hi all,

I’ve set up a nicely functioning smoke grenade that spawns a smoke emitter every second as the grenade rolls around on the ground. The problem I’m having now is that I can’t seem to get the emitter to disappear. I’ve tried adding even just a .1 second delay and using DestroyCommponent on the return value from the Spawn Emitter node, but it doesn’t destroy the emitter. What’s going on? It seems to work fine if I remove the delay, not sure why.

Edit: I got the emitters to deactivate , but I’m seeing some weird behavior. If I add a 10 second delay from the moment the first emitter is spawned, I can deactivate all the emitters at once (storing them into an array and then looping through the array). I can’t add a 5 second delay as each index in the array is looped through though, it doesn’t deactivate them, and that’s really what I want; I don’t want all the smoke to just suddenly disappear at once.

Hmm, I really tried looking for all sorts of “life”/“time”/“kill” nodes, I think this one isn’t compatible with a particle component but I’ll check. I did get this semi-working using a bit of a rig with a combination of Set Timer and Delay.Thanks for mentioning this one.

How about this:

You start smoking every second, add the components to the array. After 10 seconds start removing smoke in the order it was added, using the very same timer.

If you want the smoke to linger for some time without adding / removing emitters, you can pause the timer between delays. Alternatively, use something more substantial than a boolean to indicate the current state of the grenade. And integer would do OK or an enumerator for that extra clarity.

This is all very similar to what I ended up doing. I used set timer by function rather than event, I didn’t know that little red box on the event node was for that! TIL. I did manage to let a smoke emitter spawn every half second for 7 seconds or so, and then kill each emitter after 3 or so seconds. It’s looking great! Now just have to figure out why I can’t get my grenade to stop rolling hehe. It rolls endlessly. Tried raising the linear and angular depending to even 5,000 and they don’t seem to do anything. It’s not a bad look since it disperses the smoke pretty nicely to be honest.

Dampening affects physics and a value of 10 will kill pretty much any movement *very *quickly. You’re most likely using Projectile Movement and not Simulating Physics (which is fine).

Look into *Friction *on the Projectile Movement Component if that’s the case. It’s probably set to something low by default, try it at .5 or thereabout.

I am simulating physics for the grenades, no projectile. Can’t seem to figure out why the dampening settings don’t do anything to it. I am enabling simulate physics and gravity when I throw it. It works because the throw and bounce is great where it’s at, but it just rolls and rolls :smiley:

Hm, it would be difficult to override damping even with a physical material. As mentioned above, a setting of 10 would *normally *make things crawl on vertical surfaces:

Do tell once you figure it out.

Wow, I’m an idiot (or maybe just an honest mistake I don’t understand). So, on my skeletal mesh, I have the simulate physics option unchecked by default, because I don’t want my character kicking the grenade around (at least not until it’s gone off). I enable the simulate physics through blueprint when I throw it, but apparently it doesn’t use the damping settings you set on the mesh when you do it that way. If I explicitly set the angular damping through blueprint after I enable simulate physics, it seems to work, and it works great!

Thank you for your time and interest in helping me out!

A quick clip if you’re interested in seeing the end result: