Set cube on fire

How do I set the cube on fire when it overlaps the wall then turn it off once it stops touching the wall using blueprints I’m so confused. I also want to have it checking every frame if the cube is touching the wall or not?

Hello !
If you already made a particle system (fire type), you could set a collision box inside your cube and use the “Spawn emitter at location” function on the desired event (begin/end overlap), it works pretty well. I didn’t try the following example but it should work I think :

You could create an blueprint actor that is just a box collision (with the presets : OverlapAll) and scale it to your wall. Then in the cube blueprint, get the overlap begin event and do a cast to your box collision that we’ve just create. If the cast succeed, then you can use the spawn emitter function. Keep a trace of your emitter in a variable (like the photo I joined).
And finally, do the same with the end overlap event and destroy the emitter component !

Hi guys, sorry for the late response I have been quite busy !

So I’ve tried my example and I think I understand why it keeps looping over and over thanks to the debug filter.
When you move your character inside the box, it triggers the begin overlap event without any problem, ok. But when you want to move your character outside the box, the end overlap AND the begin overlap events get triggers… So in fact, when you get outside the box, the previous emitter is destroyed but another one is created. You will see that the more goings and comings you will do, the more emitters you will create.

To avoid that, you can use the “is valid” check function on the emitter. When you go in the box, the emitter is not valid then you can spawn it. When you go outside the box, the emitter is valid : it can’t be spawn if the begin overlap event gets triggers. Try the blueprint example I made, it works for me.

It might be a collision issue but if devs have some clarifications I’ll be interested to know why it happens !

this spawns it once but then it does not respawn, how to make it respawn?