Area of godmode...

Discussion in 'Mapping Questions & Discussion' started by DeOntwerper, May 10, 2015.

  1. DeOntwerper

    DeOntwerper L1: Registered

    Messages:
    46
    Positive Ratings:
    1
    I have been trying to look for a solution for this that doesn't require an external plugin.

    I am wanting to have an area in which players cannot be hurt through backstab, stickies, Melee damage etc effectively giving them "godmode".

    I have tried the stuff in this thread but it has never seemed to work for me even when copying EXACTLY what the names etc were.

    http://forums.tf2maps.net/showthread.php?t=18979

    Are there any more solutions other than external plugins?
     
  2. killohurtz

    aa killohurtz Distinction in Applied Carving

    Messages:
    1,003
    Positive Ratings:
    1,155
    You can do this with a trigger_add_tf_player_condition and a condition that gives Ubercharge. Condition 51 (TF_COND_INVULNERABLE_HIDE_UNLESS_DAMAGED) would probably work best for your situation. In order for the condition to only apply while a player is inside the trigger, you'll want to set the duration to -1.
     
  3. DeOntwerper

    DeOntwerper L1: Registered

    Messages:
    46
    Positive Ratings:
    1
    Wouldn't that give the effect of an ubercharge on the client side HUD?
     
  4. killohurtz

    aa killohurtz Distinction in Applied Carving

    Messages:
    1,003
    Positive Ratings:
    1,155
    It would, but I'm not sure if there are any other options besides sv_cheats, plugins, or the methods in that thread.
     
  5. NeonHeights

    NeonHeights L1: Registered

    Messages:
    25
    Positive Ratings:
    5
    Here's how you can make this work in Team Fortress 2. You'll need 3 entities, a trigger_multiple brush and 2 filter_damage_type entities.

    1. Make two filter_damage_type's and name one "God_Mode" and the other "Mortal_Mode"

    2. For the God_Mode filter, make the damage type "EnergyBeam" and set filter-mode to "Allow"

    3. For the Mortal_Mode filter, make the damage type "EnergyBeam" and set the filter-mode to "Disallow"

    4. Make a trigger_multiple in the area that you want players to have the god mode

    5. Set outputs on the trigger_multiple as follows:
    --- OnStartTouch > !activator > SetDamageFilter > God_Mode
    --- OnEndTouch > !activator > SetDamageFilter > Mortal_Mode

    This means whenever a player (the !activator) enters this trigger, they can ONLY be damaged by "EnergyBeam" which is an unused damage type. As soon as they leave it, they have the mortal filter applied to them which means anything "EnergyBeam" CANNOT damage them now. Either way its completely irrelevant because energybeam is not an actual type of damage. Players who enter the trigger will not be able to be backstabbed, damaged or hurt in any way. It resembles the effects of "God Mode" in sourcemod.

    I highly recommend that you put an additional trigger_multiple in the spawn of your map with a "OnStartTouch > !activator > SetDamageFilter > Mortal_Mode" output in it. Sometimes the initial activating trigger can be somewhat buggy and MIGHT not remove the God_Mode filter from the player if they exit it in strange ways (teleport out, lag etc..) and you wouldnt want a random player running around your server invincible and killing people. So the extra spawn trigger will act as a backup and remove any filters that might be left on the player when they respawn/enter the spawn room.

    Hope this helps. Ive had this method working in my maps for years, let me know if you have any more questions
     
    • Thanks Thanks x 4
    Last edited: May 14, 2015
  6. DeOntwerper

    DeOntwerper L1: Registered

    Messages:
    46
    Positive Ratings:
    1
    Works fine if it's just 1 trigger.

    However when I have to put 4 triggers around a ring...it messes up completely.
     
  7. worMatty

    aa worMatty Repacking Evangelist

    Messages:
    1,072
    Positive Ratings:
    834
    If those four trigger brushes are touching each other, then select them all and press Ctrl+T, tie them all to the same single trigger entity.
     
  8. Anreol

    Anreol L6: Sharp Member

    Messages:
    262
    Positive Ratings:
    273
    But it gives the effect of ubercharge when someone damages you or all the time?
     
    Last edited: May 25, 2015
  9. Lenny

    Lenny L2: Junior Member

    Messages:
    90
    Positive Ratings:
    35
    51 won't show you as Ubercharged until someone fires at you, and that goes for both your viewmodel and worldmodel. It's what the MvM bots have when they first spawn.
     
  10. 【EmNudge】

    【EmNudge】 L4: Comfortable Member

    Messages:
    180
    Positive Ratings:
    37
    I really am sorry for bringing up a year old thread, but I just felt like this would b easier, with all the info already inside it.

    The EnergyBeam damage type is no longer in the dropdown menu, although I do remember seeing it back in 2015. turning off smartedit reveals the damage types are just numbers. Does anybody know if this is still working and, if so, know what the EnergyBeam damagetype number is?
     
  11. Izotope

    aa Izotope Never releases maps

    Messages:
    615
    Positive Ratings:
    573
    • Thanks Thanks x 1