Announcement

Collapse
No announcement yet.

Flash bang / smoke grenade Questions.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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?

    #2
    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.

    Comment


      #3
      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.

      Comment


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

        Comment


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

          Comment


            #6
            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.

            Comment


              #7
              Gonna layout the whole BP for affected actors.

              http://prntscr.com/9emq6n

              http://prntscr.com/9emqgn

              http://prntscr.com/9emqzm

              http://prntscr.com/9emr4k

              http://prntscr.com/9emrbc

              http://prntscr.com/9emres


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

              Comment


                #8
                Originally posted by _cDub View Post
                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.
                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.
                My current question - Getting variables from unspawned actorcomponent

                Our game - Robots Minerals Profit! - a side-on builder game with cooperative multiplayer, made in UE4.

                Comment

                Working...
                X