So i’m working on a little side scrolling game that features fires that kill the character on contact. When the character presses E they use an extinguisher ability (steam particle effect sped up) which i’m trying to have put out the fire if it comes into contact with the fire. Is there a way to have the fire actor destroyed when hit by the particle effect? I’m still new to UE4 and i feel like i’m banging my head against the wall.
When the player presses the button I’d just check if they are near the fire and facing it.
Either have the fire have a collision box so you can check collision or do a range check with get all actors of class.
You could also raytrace from the character and see if you hit fire then extinguish it.
What you can do is when you press E, get all the overlapping actors in your character, then loop through looking for fire, and destroy it.
Set the filter to be your DeathFire BP then destroy all actors in that array
I’ve been trying to map the key input to the destroy actor function but it doesn’t seem to work. This is the blueprint i’ve got set up to kill the player on contact with the fire and the extinguish function. Should i create a new overlap area with responds when the character is in the area and presses E?