trigger_add_tf_player_condition

From Valve Developer Community
Jump to: navigation, search

<Team Fortress 2> trigger_add_tf_player_condition is a brush entity available in Team Fortress 2.

Entity description

This entity will give players various conditions within its volume, (Same as "addcond" command but doesn't need cheats).

List of Conditions

Conditions:

Team fortress 2 wiki page for addcond's : Cheats

  • -1 : TF_COND_INVALID
  • 0 : TF_COND_AIMING
  • 1 : TF_COND_ZOOMED (Sniper rifle zoomed in)
  • 2 : TF_COND_DISGUISING (Smoke effects upon disguising)
  • 3 : TF_COND_DISGUISED (Mask when disguised)
  • 4 : TF_COND_STEALTHED (Cloaked)
  • 5 : TF_COND_INVULNERABLE
  • 6 : TF_COND_TELEPORTED (Particle effects from being teleported)
  • 7 : TF_COND_TAUNTING (Taunting)
  • 8 : TF_COND_INVULNERABLE_WEARINGOFF (Ubercharge wearing off)
  • 9 : TF_COND_STEALTHED_BLINK
  • 10 : TF_COND_SELECTED_TO_TELEPORT
  • 11 : TF_COND_CRITBOOSTED (Crit boost)
  • 12 : TF_COND_TMPDAMAGEBONUS (Damage bonus)
  • 13 : TF_COND_FEIGN_DEATH (Dead ringer fake death)
  • 14 : TF_COND_PHASE
  • 15 : TF_COND_STUNNED (Stunned by scare from ghosts, headless horseman..)
  • 16 : TF_COND_OFFENSEBUFF
  • 17 : TF_COND_SHIELD_CHARGE
  • 18 : TF_COND_DEMO_BUFF
  • 19 : TF_COND_ENERGY_BUFF
  • 20 : TF_COND_RADIUSHEAL
  • 21 : TF_COND_HEALTH_BUFF
  • 22 : TF_COND_BURNING (Burning)
  • 23 : TF_COND_HEALTH_OVERHEALED
  • 24 : TF_COND_URINE (Covered in jarate)
  • 25 : TF_COND_BLEEDING (Bleeding)
  • 26 : TF_COND_DEFENSEBUFF (Batalions backup buff)
  • 27 : TF_COND_MAD_MILK (Covered in mad milk)
  • 28 : TF_COND_MEGAHEAL (Quick fix megaheal)
  • 29 : TF_COND_REGENONDAMAGEBUFF
  • 30 : TF_COND_MARKEDFORDEATH (Marked for death)
  • 31 : TF_COND_NOHEALINGDAMAGEBUFF
  • 32 : TF_COND_SPEED_BOOST (Disciplinary action speed boost)
  • 33 : TF_COND_CRITBOOSTED_PUMPKIN (Crit boost from a halloween pumpkin)
  • 34 : TF_COND_CRITBOOSTED_USER_BUFF (Crit boost from a canteen)
  • 35 : TF_COND_CRITBOOSTED_DEMO_CHARGE (Crit glowing effect from charging)
  • 36 : TF_COND_CRITBOOSTED_HYPE (Mini crit boost from hype)
  • 37 : TF_COND_CRITBOOSTED_FIRST_BLOOD (First blood crit boost)
  • 38 : TF_COND_CRITBOOSTED_BONUS_TIME (Bonus time crit boost)
  • 39 : TF_COND_CRITBOOSTED_CTF_CAPTURE (Intelligence capture crit boost)
  • 40 : TF_COND_CRITBOOSTED_ON_KILL (On kill crit boost ex: KGB)
  • 41 : TF_COND_CANNOT_SWITCH_FROM_MELEE (Buffalo steak sandvich effect, Can not switch from melee. Doesn't force switch to melee)
  • 42 : TF_COND_DEFENSEBUFF_NO_CRIT_BLOCK (Batalions backup buff without blocking crits)
  • 43 : TF_COND_REPROGRAMMED
  • 44 : TF_COND_CRITBOOSTED_RAGE_BUFF
  • 45 : TF_COND_DEFENSEBUFF_HIGH
  • 46 : TF_COND_SNIPERCHARGE_RAGE_BUFF (Hitmans heatmaker focus)
  • 47 : TF_COND_DISGUISE_WEARINGOFF
  • 48 : TF_COND_MARKEDFORDEATH_SILENT (Same as marked for death but not displayed to marked target)
  • 49 : TF_COND_DISGUISED_AS_DISPENSER
  • 50 : TF_COND_SAPPED (Sapped)
  • 51 : TF_COND_INVULNERABLE_HIDE_UNLESS_DAMAGED
  • 52 : TF_COND_INVULNERABLE_USER_BUFF
  • 53 : TF_COND_HALLOWEEN_BOMB_HEAD (Player's head turned into a bomb and hearing bombinomicon lines)
  • 54 : TF_COND_HALLOWEEN_THRILLER (Halloween thriller taunt)
  • 55 : TF_COND_RADIUSHEAL_ON_DAMAGE (Concheror buff)
  • 56 : TF_COND_CRITBOOSTED_CARD_EFFECT (Critboost from the wheel of doom)
  • 57 : TF_COND_INVULNERABLE_CARD_EFFECT (Ubercharge from the wheel of doom)
  • 58 : TF_COND_MEDIGUN_UBER_BULLET_RESIST (Vaccinator ubercharge bullet damage resistance)
  • 59 : TF_COND_MEDIGUN_UBER_BLAST_RESIST (Vaccinator ubercharge explosive damage resistance)
  • 60 : TF_COND_MEDIGUN_UBER_FIRE_RESIST (Vaccinator ubercharge fire damage resistance)
  • 61 : TF_COND_MEDIGUN_SMALL_BULLET_RESIST (Vaccinator passive bullet damage resistance)
  • 62 : TF_COND_MEDIGUN_SMALL_BLAST_RESIST (Vaccinator passive explosive damage resistance)
  • 63 : TF_COND_MEDIGUN_SMALL_FIRE_RESIST (Vaccinator passive fire damage resistance)
  • 64 : TF_COND_STEALTHED_USER_BUFF
  • 65 : TF_COND_MEDIGUN_DEBUFF
  • 66 : TF_COND_STEALTHED_USER_BUFF_FADING
  • 67 : TF_COND_BULLET_IMMUNE (Immune to bullet damage)
  • 68 : TF_COND_BLAST_IMMUNE (Immune to explosive damage)
  • 69 : TF_COND_FIRE_IMMUNE (Immune to fire damage)
  • 70 : TF_COND_PREVENT_DEATH (Player will survive all damage taken until health reaches 1, after reaching 1 health the effect is removed)
  • 71 : TF_COND_MVM_BOT_STUN_RADIOWAVE
  • 72 : TF_COND_HALLOWEEN_SPEED_BOOST (Speed boost upon reaching the clock and entering the teleporter in Helltower.)
  • 73 : TF_COND_HALLOWEEN_QUICK_HEAL (Fast heal upon reaching the clock and entering the teleporter in Helltower.)
  • 74 : TF_COND_HALLOWEEN_GIANT
  • 75 : TF_COND_HALLOWEEN_TINY
  • 76 : TF_COND_HALLOWEEN_IN_HELL
  • 77 : TF_COND_HALLOWEEN_GHOST_MODE
  • 78 : TF_COND_MINICRITBOOSTED_ON_KILL (Unknown)
  • 79 : (The player has a 75% chance to dodge every time damage is taken; MISS! effect then occurs. !FGD )
  • 80 : (Player gains a parachute if airborne, which is removed upon landing. !FGD )
  • 81 : (Fire rate bonus on the Air strike weapon. !FGD )
  • 82 : TF_COND_HALLOWEEN_KART (The player is placed inside a bumper Car and can control it.)
  • 83 : TF_COND_HALLOWEEN_KART_DASH (Player's FOV increases, with their world model playing the Bumper Car boosting animation. If the player has condition 82, the player is forced to move forwards at a boosted speed until the condition is removed or a wall or other player is encountered.)
  • 84 : TF_COND_SPACE_GRAVITY (Player gains a larger head and lowered gravity.)
  • 85 : (Player is forced to use melee weapons. Adds conditions 32 and 75. !FGD )
  • 86 : (Player can swim in the air, and gains effects as in underwater or covered by Jarate. !FGD )
  • 87 : (Player is locked in place and cannot turn. !FGD )
  • 88 : (Player gains a cage surrounding them. Adds condition 87 when added. !FGD )
  • 89 : (Player is considered as holding a Mannpower powerup. Using the dropitem command will drop a powerup pickup (usually Strength) and remove this condition. !FGD)
  • 90 : TF_COND_RUNE_STRENGTH
  • 91 : TF_COND_RUNE_HASTE
  • 92 : TF_COND_RUNE_REGEN
  • 93 : TF_COND_RUNE_RESIST
  • 94 : TF_COND_RUNE_VAMPIRE
  • 95 : TF_COND_RUNE_WARLOCK
  • 96 : TF_COND_RUNE_PRECISION
  • 97 : TF_COND_RUNE_AGILITY
  • 98 : TF_COND_GRAPPLINGHOOK (Added when a player fires the Grappling Hook. Addition or removal via commands has no effect.)
  • 99 : TF_COND_GRAPPLINGHOOK_SAFEFALL (Added when a player's Grappling Hook begins pulling them. Removed when the player lands. Addition or removal via commands has no effect.)
  • 100 : TF_COND_GRAPPLINGHOOK_LATCHED
  • 101 : TF_COND_GRAPPLINGHOOK_BLEEDING
  • 102 : TF_COND_AFTERBURN_IMMUNE
  • 103 : TF_COND_RUNE_KNOCKOUT
  • 104 : TF_COND_RUNE_IMBALANCE (Added when player gains the Mannpower Revenge powerup. Prevents pickup of the Mannpower Crit or Uber powerups.)
  • 105 : TF_COND_CRITBOOSTED_RUNE_TEMP
  • 106 : TF_COND_PASSTIME_INTERCEPTION
  • 107 : TF_COND_SWIMMING_NO_EFFECTS (Player can swim in air, similar to condition 86, but without swimming animations and underwater overlay.)
  • 108 : TF_COND_PURGATORY
  • 109 : (Player gains an increase in max health, health regen, fire rate, and reload rate. Used for the "King" powerup in Mannpower mode. !FGD)
  • 110 : (The Plague powerup from Mannpower. !FGD)
  • 111 : (The Supernova powerup from Mannpower. !FGD)
  • 112 : (Plagued by the Plague powerup from Mannpower !FGD)
  • 113 : (The area-of-effect buffs from the King powerup from Mannpower. !FGD)
  • 114 : (Enables glow outlines on friendly players and buildings. Used when player respawns. !FGD)
  • 115 : (Used whenever a player is under the effects of Compression blast. Removed when the player touches the ground. !FGD)
  • 116 : TF_COND_COMPETITIVE_WINNER !FGD
  • 117 : TF_COND_COMPETITIVE_LOSER !FGD
  • 118 : (The healing debuff added by the Pyro's Flamethrower. !FGD)
  • 119 : (Applied when the player is carrying the Jack in PASS Time with no nearby teammates. Marks the player for death. !FGD)
  • 120 : TF_COND_GRAPPLED_TO_PLAYER !FGD
  • 121 : TF_COND_GRAPPLED_BY_PLAYER !FGD
  • 122 : TF_COND_PARACHUTE_DEPLOYED !FGD
  • 123 : (Gas coating effect from the Gas Passer. !FGD)
  • 124 : (Afterburn effect applied to Pyros when hit by the Dragon's Fury projectile. !FGD)
  • 125 : TF_COND_ROCKETPACK (Applied when the boosters on the Thermal Thruster activate. Removed when the player touches the ground. !FGD)
  • 126 : TF_COND_LOST_FOOTING (When added while moving, decreases the player's friction, causing them to slide around. Removed when the player stops moving. !FGD)
  • 127 : TF_COND_AIR_CURRENT !FGD

Keyvalues

Targetname:

Name <string>
The targetname that other entities refer to this entity by.
Entity Scripts <scriptlist> (New with Left 4 Dead 2)
Space delimited list of VScript files (without file extension) that are executed after all entities have spawned. The scripts are all executed in the same script scope, later ones overwriting any identical variables and functions.
Script think function <string> (New with Left 4 Dead 2)
Name of a function in this entity's script which will be called automatically every 100 milliseconds (ten times a second) for the duration of the script. It can be used to create timers or to simulate autonomous behavior. The return value (if present) will set the time until the next call.
Note:Try to avoid expensive operations in this function, as it may cause performance problems.

Origin:

Origin (X Y Z) <origin>
The position of this entity's center in the world. Rotating entities typically rotate around their origin.

Condition:

Condition <integer>
Condition to give to the player.
Duration <integer>
How long the chosen condition lasts. -1 makes it last until it's cleared by other means.

Flags

TriggerOnce:

  • 1 : Clients
  • 2 : NPCs
  • 4 : Pushables
  • 8 : Physics Objects
  • 16 : Only player ally NPCs
  • 32 : Only clients in vehicles
  • 64 : Everything (not including physics debris)
  • 512 : Only clients *not* in vehicles
  • 1024 : Physics debris
  • 2048 : Only NPCs in vehicles (respects player ally flag)
  • 4096 : Disallow Bots
  • 4096 : Correctly account for object mass (trigger_push used to assume 100Kg) and multiple component physobjs (car, blob...) (New with Alien Swarm)

Inputs

Targetname:

Kill
Removes this entity and any entities parented to it from the world.
KillHierarchy
Functions the same as Kill, although this entity and any entities parented to it are killed on the same frame, being marginally faster than Kill.
AddOutput  <string>
Evaluates a keyvalue/output on this entity. It can be potentially very dangerous, use with care.
Format: <key> <value>
Format: <output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire, -1 means infinite>
FireUser1 to FireUser4
Fire the OnUser outputs; see User Inputs and Outputs.
Use  !FGD
Same as a player invoking +use; may not do anything. Can also be invoked by creating an output that does not specify an input.
This input is not included in Valve's FGDs.
RunScriptFile  <script> (New with Left 4 Dead 2)
Execute a VScript file from disk, without file extension. The script contents are merged with the script scope of the receiving entity.
RunScriptCode  <string> (New with Left 4 Dead 2)
Execute a string of VScript source code in the scope of the entity receiving the input. String quotation may be needed when fired via console.
Bug: In <Left 4 Dead 2>, the code is executed in the script scope of the entity that fires the output, not the one receiving the input.
Warning: Never try to pass string parameters to a script function with this input. It will corrupt the VMF structure because of the nested quotation marks, which then must be removed manually with a text editor.
CallScriptFunction  <string> (New with Left 4 Dead 2) !FGD
Execute a VScript function in the scope of the receiving entity.
SetLocalOrigin  <coordinates> (New with Alien Swarm) !FGD
Send this entity to a spot in the map. If the entity is parented to something, it will be offset from the parent by this amount.
SetLocalAngles  <angles> (New with Alien Swarm) !FGD
Set this entity's angles.

EnableDisable:

Enable
Disable
Enable/disable this entity from performing its task. It might also disappear from view.

Toggle:

Toggle
Toggle the enabled/disabled status of this entity.

Outputs

Trigger:

OnEndTouch
Fired when an entity stops touching this trigger. Only entities that passed this trigger's filters will cause this output to fire. (activator is the exiting entity)
OnEndTouchAll
Fires when the last entity in the entity's area exits this trigger or when this entity is disabled. Only entities that passed this trigger's filters are considered. (activator is the last exiting entity)
OnTouching (New with Half-Life 2: Episode Two / Source 2007)
OnNotTouching (New with Half-Life 2: Episode Two / Source 2007)
Fired when the TouchTest input is called.

TriggerOnce:

OnStartTouch
Fired when an entity starts touching this trigger. The touching entity must pass this trigger's filters to cause this output to fire. (activator is the toucher)
OnTrigger
Fired whenever the trigger is activated. (activator is the activator)

Targetname:

OnUser1 to OnUser4
These Outputs each fire in response to the firing of the like-numbered FireUser1 to FireUser4 Input; see User Inputs and Outputs.
OnKilled  (Only in the Left 4 Dead series)
This Output fires when the entity is killed and removed from the game.