Trigger active weapon detect: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
m (→‎Outputs: Substituted IO templates)
 
(7 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{DISPLAYTITLE:trigger_active_weapon_detect}}
<!-- When this page is updated to {{langsp}} or {{language subpage}} instead of {{lang}}, please move {{this is a}} to the base page, as it is automatically translated. -->{{lang}}{{CD|CTriggerActiveWeaponDetect}}
{{l4d2 brush|trigger_active_weapon_detect}}<br><br>
{{this is a|brush entity|name=trigger_active_weapon_detect|game=Left 4 Dead 2}} It fires an output when touched by a player that has a specific weapon active.
 
== Entity description ==
'''trigger_active_weapon_detect''' fires an output when touched by a player that has a specific weapon active. This brush entity is available in [[Left 4 Dead 2]].


== Keyvalues ==
== Keyvalues ==
* {{KV Targetname}}
{{KV|Weapon To Detect|intn=weaponclassname|string|weapon classname that player must have active}}
* {{KV EnableDisable}}
* {{KV Global}}
* '''Filter Name'''
: ''filtername'' <filterclass> Filter to use to see if activator triggers me. See filter_activator_name for more explanation.
* '''Weapon To Detect'''
: ''weaponclassname'' <string> weapon classname that player must have active.
 
== Flags ==
* {{Fl Trigger}}
 
== Inputs ==
* {{I TriggerOnce}}


== Outputs ==
== Outputs ==
* {{O Targetname}}
{{O|OnTouchedActiveWeapon|Touched a player who has our weapon active}}
* {{note|There is a second occurence of Targetname outputs.}} {{O Targetname}}
* {{ScrollBox|title=Trigger|noscroll=true|
; <code>OnStartTouch</code>
: Fired when an entity starts touching this trigger. The touching entity must pass this trigger's filters to cause this output to fire.
; <code>OnStartTouchAll</code>
: Fired when an entity starts touching this trigger, and no other entities are touching it. Only entities that passed this trigger's filters are considered.
; <code>OnEndTouch</code>
: Fired when an entity stops touching this trigger. Only entities that passed this trigger's filters will cause this output to fire. {{activator|exiting entity}}
; <code>OnEndTouchAll</code>
: 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|last exiting entity}}
; OnTouchActiveWeapon
: Touched a player who has our weapon active
}}
== See also ==
 
[[Category:Left 4 Dead 2 Entities]]

Latest revision as of 23:04, 20 April 2025

English (en)Translate (Translate)
C++ Class hierarchy
CTriggerActiveWeaponDetect
CBaseTrigger
CBaseToggle
CBaseEntity

trigger_active_weapon_detect is a brush entity available in Left 4 Dead 2 Left 4 Dead 2. It fires an output when touched by a player that has a specific weapon active.

Keyvalues

Weapon To Detect (weaponclassname) <string>
weapon classname that player must have active

Outputs

OnTouchedActiveWeapon
Touched a player who has our weapon active