This article's documentation is for anything that uses the Source engine. Click here for more information.

Trigger remove: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (→‎Outputs: Substituted IO templates)
 
(20 intermediate revisions by 12 users not shown)
Line 1: Line 1:
{{wrongtitle|title=trigger_remove}}
{{CD|CTriggerRemove|file1=triggers.cpp}}
{{base_brush}}
{{this is a|brush entity|name=trigger_remove}} It is a [[trigger]] volume that removes any [[entity|entities]] that touch it.
 
==Entity Description==
A trigger volume that removes any entities that touch it.


{{optim_brush}}
{{optim_brush}}
Line 11: Line 8:
This is not the same as killing entities; i.e. NPCs removed in this manner will not fire their ''OnKilled'' outputs.
This is not the same as killing entities; i.e. NPCs removed in this manner will not fire their ''OnKilled'' outputs.


==Availability==
{{code class|CTriggerRemove|triggers.cpp}}
{{in game|brush}} {{game-base}}
{{in code|class=class_c_trigger_remove.html CTriggerRemove|file=triggers_8cpp-source.html triggers.cpp}}


==Keyvalues==
==Keyvalues==
*{{kv trigger}}
{{KV Trigger}}
{{KV Targetname}}


==Flags==
==Flags==
*{{fl trigger}}
{{Fl Trigger}}


==Inputs==
==Inputs==
*{{i trigger}}
{{I EnableDisable}}


==Outputs==
==Outputs==
*{{o targetname}}
{{O|OnRemove|Fired whenever an entity is removed.}}
*{{o trigger}}
*'''OnRemove'''
:Fired whenever an entity is removed.

Latest revision as of 21:47, 19 April 2025

C++ Class hierarchy
CTriggerRemove
CBaseTrigger
CBaseToggle
CBaseEntity
C++ triggers.cpp

trigger_remove is a brush entity available in all Source Source games. It is a trigger volume that removes any entities that touch it.

Warning.pngWarning:Removing some entities can cause instability.

This is not the same as killing entities; i.e. NPCs removed in this manner will not fire their OnKilled outputs.

C++ In code, it is represented by theCTriggerRemoveclass, defined in thetriggers.cppfile.

Keyvalues

BaseTrigger
Filter Name (filtername) <filter>
A filter entity to test potential activators against.
Start Disabled (StartDisabled) <boolean>
Stay dormant until activated (with theEnableinput).
Name (targetname) <string>[ Edit ]
The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g. parentname or target).
Also displayed in Hammer's 2D views and Entity Report.
See also:  Generic Keyvalues, Inputs and Outputs available to all entities

Flags

BaseTrigger
Everything (not including physics debris) : [64]
Clients (Survivors, Special Infected, Tanks Left 4 Dead seriesLeft 4 Dead series) : [1]
Only clients in vehicles : [32]
Only clients *not* in vehicles : [512]
Disallow Bots (removed since Left 4 Dead) : [4096]
NPCs (Common Infected, Witches Left 4 Dead seriesLeft 4 Dead series) : [2]
Only player ally NPCs : [16]
Only NPCs in vehicles (respects player ally flag) : [2048]
Physics Objects (not including physics debris) : [8]
Physics debris (include also physics debris) : [1024]
Pushables (Passes entities with classname func_pushable) : [4] Obsolete
Deprecated.
Equivalent to using Everything + filter_activator_class that filters func_pushable.

Inputs

EnableDisable:

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

Outputs

OnRemove
Fired whenever an entity is removed.