- Jan 18, 2013
- 11
- 0
Hello all, I want to make a trigger that makes people invincible when entering and vulnerable when leaving. A safe area. I can't figure out what trigger this is, or if its even a trigger.
This can be done using a damage filter.
Make a filter_activator_name, name it godmode, and set it to Allow and filter entities named blahblah.
Make a trigger_multiple covering the whole room, and give it the following outputs:
Output|Target|Input|Parameter
OnStartTouch|!activator|SetDamageFilter|godmode
OnEndTouch|!activator|SetDamageFilter|
To clarify, literally type in "blahblah", or anything. The point is to tell it to use a filter for an entity that does not exist, thereby causing any and all damage to be filtered and blocked. Further, the second output should indeed have the parameter blank, this will clear the setting when they leave and allow them to be injured again.
I had a look inside a map named "irongein_gamecenter". It has rooms, inculding the spawnroom where both BLU and RED spawn in, with godmode.
But when they go outside they become vulernable until they go in a protected room.
Left one is the one which gives the player (!activator) godmode when spawning/steeping inside it. The right one is the one which makes the player vulernable to damage when walking/steeping trough/inside it.
!activator is a target name for the enitity (inculding random physic props, weapons, players and NPC's) which activates the trigger/button. IT ONLY GIVE THE EFFECT TO THE TARGET!
Targetnames and about them.
The only way I think you could do this, apart from what duppy said (which still allows backstab/headshot kills) is have a trigger_multiple that fires a point_clientcommand that fires addcond 5 (the uber effect). The problem is, this requires sv_cheats 1, which may be an issue.
I did the above for the triggers and it didn't work, is there another step I have to do?
You'll have to make a filter_damage_type with the name: filter_godmode (or in the case with those pictures, I guess you would use IncreasedFilter as your name) with the damage type set to: 1024. The filter is enabled to the person (!activator) who touches that trigger_multiple and is disabled when the person touches the other trigger_multiple. Also make sure the filter mode is set to 'allow entities that match criteria'. You then, I guess, also have to make another filter_damage_type with the damage type set to: 0 - I assume, and name that NormalFilter, so that people go back to normal afterwords.