Flash bang / smoke grenade Questions.

So I have a flashbang that when it goes off calls upon a flash BP that uses a material with some PP attached on it to make the screen solid white.

One problem I have is that the material is attached to the grenade so if you are flashed and take a few steps back you will become unflashed, or if you aren’t flashed and walk a few steps forward you will become flashed.

How would I set up an AOE to have it so I can’t unflash my self by walking backwards or flash myself by walking forwards after the grenade has gone off?

Not sure if this is the best approach but here goes: You should make the white effect material trigger on the characters blueprint instead of the grenade. When the flashbang detonates you should find all characters that are within the range of the bang. Then call event/function for those characters and check if they’re looking at the bang when the event is fired (if that is what you’re going after). If they’re affected by the flashbang then apply effects like the white screen and ringing etc to that particular character.

Smoke grenade is a bit different, it spawns the smoke where it detonates so you should be able to do the smoke effect on the grenade blueprint.

You can use the absoulute value of the Delta between look rotation and look-at-rotation (Get look at rotation -> get actor rotation -> subtract -> get absolute value -> subtract this from a number, lets say 60, and use this result to control the length/“power” of the flash.

Appreciate the responses, gonna see what I can do with what I know how to do.

Believe I’m just gonna get a price quote and contract this out to someone. I can’t figure it out.

You could have the grenade spawn a trigger volume. Take all of the players in the volume and call a function on them. The function in the pawn will start a post process or whatever you are using to flash, then after a certian time use a lerp or time line to ease out the flash.

Gonna layout the whole BP for affected actors.

That’s everything in the BP i see to affect actors.

This sounds like the correct way to do it. You would probably also want a function which scales the intensity down proportional to the size angle between the player’s facing and the explosion of the flashbang.