Trigger once

From Valve Developer Community
Revision as of 03:54, 14 March 2023 by THE OWL (talk | contribs)
Jump to navigation Jump to search
English (en)中文 (zh)Translate (Translate)
C++ Class hierarchy
CTriggerOnce
CTriggerMultiple
CBaseTrigger
CBaseToggle
CBaseEntity
C++ triggers.cpp

Template:Entity It is a trigger volume that removes itself after it has been triggered (touched by a qualifying entity) once. A trigger uses outputs to activate an event in another entity.

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

BaseTrigger:
Toggle
Toggles this trigger between enabled and disabled states.
Enable
Enable trigger
Disable
Disable trigger
StrataEngine:
Touch  (only in Strata Source Strata Source games)
Behaves as if !caller has touched the trigger volume

Outputs

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 repeatedly with a delay while an entity is within this trigger's volume. Delay is defined by Delay Before Reset key.

See also