Announcement

Collapse
No announcement yet.

How do you make a damage causing volume only dmg every X seconds?

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

    How do you make a damage causing volume only dmg every X seconds?

    So how would one go about making a damage causing volume that would only damage for X seconds every Y seconds? I also want to Q this with a light emmiting volume or something along that lines, IE the lights flash red/blue instead of just w/e color they were when this count down nears or end.

    SO in short:

    Damage volume that only damages when a timer ends and then does this for a specified time.

    Lights that change color or show up only when the damage is happening.

    An emmiter or static mesh that only shows up when the damage volume/timer has expired

    Has to repeat after timer ends and the other stuff all goes away.

    Not looking for someone to do this for me so much as an idea of where to start. That is of course unless someone wants to help set up/plan the level with me. Either way any help is appreciated.

    #2
    It would have to be done through Matinee and Blueprint. I'm working on something that involves triggered lights, sound and a pain volume. It's a bit of a brain killer trying to get it all to work at once.
    Win 10
    iMac (27-inch, Late 2013)
    3.5 GHz Intel Core i7
    32 GB 1600 MHz DDR3
    NVIDIA GeForce GTX 780M 4096 MB

    Maps:
    DM-RadioActive (Work In progress) DM-Ethos (WIP) DM-QWERTY (WIP) DM-TwinFalls(WIP)
    2k4 DM-MoonGames, DM-Abrenabba, DM-Aphelion, DM-Pyrimid-Of-Gold, DM-UPH-Hexed, Dm-Saint, DM-LethalAdixion, DM-C4-Ariza, Dm-C4-SleepyTomb,

    Comment


      #3
      Ty for the reply. Sounds like it might be a bit out of my depth for...well..most likely ever since I cant get my head around blueprints lol

      Comment


        #4
        Blueprints is simple. No matinee is necessary here. I'll give you a quick primer on how to do this sort of thing which should also help you do a LOT of other stuff.

        For anything you want to do, an event has to cause it. For example, we will be changing the damage of the volume perpetually for the duration of a match, so the first node added in BP would be Event Begin Play... the action will be applied from the moment you "begin play". Straightforward. And that node is typically always there anyway, so let's get started moving forward from there.

        Since you want a volume to be affected you need a reference to the volume in the blueprint as well, that's added by right clicking in the Level BP window with the volume object also selected in your level.

        There are many ways to skin a cat with BP, and code too of course, what you really want though is the most simple and elegant solution available. Yes you could use matinee, but here there are simpler methods. Let's say we want to apply damage after 10 seconds, and for a period of 5 seconds. This would require two SET damage per sec nodes and two delay nodes, then looping that.

        In BP for any object you reference (like our Pain Causing Volume), when you drag out the connector from the reference node, the context menu will allow you to automatically see what properties you can play with or what actions you can apply. In this case, for a Pain Causing volume, with that reference node selected, when you drag out from the blue dot, and the menu appears, look for "Variables". it will show "Pain Causing Volume", so expand that, and you will see it reveals stuff like "damage per second".

        Alternatively when you just want to add a typical action somewhere like a delay or timer, again just right click and type what you want in the search. We can add a Delay node.

        This is what you would need for a very basic implementation:

        1. Event: Begin Play
        2. a reference to your volume
        3. Add a delay node
        3. Drag pin out from reference, find the appropriate action from the context menu SET damage per second.
        4. Connect the arrow from begin play to the in arrow of the SET node.
        5. Set the damage per second desired, which is 0 to begin.
        6. Connect out arrow from SET to Delay.
        7. Set delay to 10, or whatever you want it to be in sec.
        8. Duplicate both the delay and the SET node, paste them and connect them all
        9. Set the second Set Damage to whatever damage you want to apply. 20 per second might work well.
        10. Set the second delay to 5
        11. Connect the out from Delay number 2 to the input of the first SET.
        12. Verify that the pain volume reference is the target for both SET nodes.

        Now you should be done.
        Last edited by HenrikRyosa; 04-28-2015, 10:29 PM.

        UT4 modding discussion: irc.globalgamers.net #UTModders
        Contrib Digest | UT2341 - Henrik's UT4 Dev Blog | Twitter

        Comment


          #5
          HOLY **** THANK YOU! As soon as I have time I'm going to try this! I'm dying to add some blue print stuffs!! Now I have to eventually get textures Yuk! Anyone wanna help me with my map? hahaha

          Comment


            #6
            Wait for the next build. It will have an example of a damage chamber.
            ] Map Scaler Tool | Betrayal for UT4 | No Spawn Protection | No Pickup Timer | BioLauncher (revived) | ForcePickupSpawn | Map cosmetics::P | Safe Spawn::P | Why numbers for Health/Armor suck!::ANALYSIS/CONCEPT
            ] UT3 Addons: NoMoreDemoGuy | PickupRespawnTweak | Mutate Spec | MutePawnSounds | NoPlayerBeacon | Epic FTW | Epic FOCK | TripodSound (... and many more)

            Comment


              #7
              Hello, thank you very much, I was looking to create that and had some trouble to do it. However, my next question would be:

              Is there any way to make that inside a Blueprint? Like a static mesh dealing damage each 2 seconds for example with particles spawned when damaging for player feedback? Regardless of collision the static mesh would each 2 second give an amount of damage and then stop damaging during 2 second to create a cycle?

              Thank you very much!

              Al

              Comment

              Working...
              X