I have a Flame Thrower setup to activate OnComponentOverlap…but I can’t figure out how to make the fire itself cause damage to the player…any help? I was thinking I needed to somehow make the particles be read as projectiles but haven’t had any luck figuring out how to do that…or if that’s even right. I only want the damage to be applied if the player get touched by the flames, and the trigger is there to activate the flame on a timer so the player has to time it to make it through.
Changing the particles to projectiles is probably going to kill performance … never tried so I am working off an assumption here.
I think the trick here would be to create a box trigger around your flames that encompasses the flames and is probably attached to a socket (not sure how your mesh is set up) so it can move with the mesh when it does.
Then hook a onOverlap event on the trigger and apply your damage to any player that enters the trigger. This should work. 8-}
Please note that this is how I would tackle this problem and is maybe not the most ideal solution. Good luck with your project.
qdelpeche’s solution should work if the flame thrower is stationary. If you want to make a portable flamethrower i would consider projectiles(with no mesh) with the same velocity as the particles. You can even adjust the speed and size of the projectile sphere over time if you have particles that spread over time. Particles arent in projectile BP though. They spawn when the projectile BP spawns, separately. That’s how i did it here anyway: http://youtu.be/vLthMpkLEIU?t=1m16s
Okay I will give this a try, thanks qdelpeche! Just to be clear…Are you saying to create a box trigger (like the one I have surrounding my mesh) to be setup to activate a box volume that appears when the flames appear and that box volume be the thing that causes damage to the player?
Yes Jacky the Flamethrower is stationary but I would like the character to have the flames stay on their body the way you have the flames showing up on the ground. The tutorials I have followed have only shown how to create static fire damage…requiring the flame to constantly be burning like a campfire causing damage because of a trigger volume that sits around the entire fire. The volume is always there though…I need it so the damage volume only appears when the flames appear.
Is there anyway to set it up so the Player is damaged by flames like the ones you have burning up the grass after it is shot out of your flamethrower? Unlike these images below…This flame is just burning like what I described above…and when I walk into it it burns me…but My flamethrower only fires when triggered so the flames aren’t just burning all the time…however I need them to damage the player if he is hit by them…
The way i did it was to spawn other flame particles on the character the projectiles overlap with. But you can do the same thing with your box trigger as well i suppose. Just spawn particles on the actor that overlaps the trigger.
I’ve figured out how to apply fire to the player after he touches the flames…but…I can’t get my flames to spawn in the right location??? I use SetWorldLocation because I intend on setting up more than one of these things on my map. The first particle system I actually had as part of the blueprints Components would just spawn at game start which isn’t what I wanted to so I used a SpawnEmitterAtLocation node but I can’t get the emitter to spawn coming out of the Flame Thrower’s barrel. Any ideas on how to fix this or even a better way of doing it?
No worries man. From what I understand … this method is more efficient then spawning emitters all the time … especially if you are placing the object as a Blue Print. Glad it worked, interested to see some live footage of your flamethrower … it looks very cool. 8-}
Well I have things looking pretty good…but now there is the issue with timing. I’m not sure if I have the set timer plugged in correctly but I am sure I don’t since it isn’t working. I just want the flame to burn for 3 seconds and then turn off…would be nice if it could turn on and off either by trigger (like I have it) or by time (once triggered).