Area of godmode...

  • If you're asking a question make sure to set the thread type to be a question!

DeOntwerper

L1: Registered
Nov 20, 2013
46
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?
 

killohurtz

Distinction in Applied Carving
aa
Feb 22, 2014
1,016
1,277
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.
 

killohurtz

Distinction in Applied Carving
aa
Feb 22, 2014
1,016
1,277
It would, but I'm not sure if there are any other options besides sv_cheats, plugins, or the methods in that thread.
 

NeonHeights

L1: Registered
Apr 27, 2012
25
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
 
Last edited:

DeOntwerper

L1: Registered
Nov 20, 2013
46
1
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
Works fine if it's just 1 trigger.

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

worMatty

Repacking Evangelist
aa
Jul 22, 2014
1,257
999
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.
 

Anreol

L2: Junior Member
Feb 21, 2015
60
273
Wouldn't that give the effect of an ubercharge on the client side HUD?

But it gives the effect of ubercharge when someone damages you or all the time?
 
Last edited:

Lenny

L2: Junior Member
May 2, 2013
90
35
But it gives the effect of ubercharge when someone damages you or all the time?

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.
 

EmNudge

L4: Comfortable Member
Sep 23, 2015
184
60
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
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?