Trigger once: Difference between revisions
Jump to navigation
Jump to search
Important:If the trigger_once is enabled while multiple entities that can trigger it are touching it each output will have different outcomes. OnStartTouch will fire for each !activator. Meanwhile OnTrigger will only trigger once.
Note: The refire amount will decide how many times your OnStartTouch will fire.
m (Changed parameters of {{this is a}} to comply with the updated version. This action was performed by a bot.) |
(clarify more) |
||
Line 24: | Line 24: | ||
{{IO|OnStartTouch}} | {{IO|OnStartTouch}} | ||
{{IO|OnTrigger|Fired when an entity starts touching this trigger. The touching entity must pass this trigger's filters to cause this output to fire. {{activator|"toucher."}}}} | {{IO|OnTrigger|Fired when an entity starts touching this trigger. The touching entity must pass this trigger's filters to cause this output to fire. {{activator|"toucher."}}}} | ||
{{ | {{Important|If the [[trigger_once]] is enabled while multiple entities that can trigger it are touching it each output will have different outcomes. OnStartTouch will fire for '''each''' [[!activator]]. Meanwhile OnTrigger will only trigger '''once'''.{{Note| The refire amount will decide how many times your OnStartTouch will fire.}}}} | ||
== See also == | == See also == |
Revision as of 07:31, 20 June 2024
![]() |
---|
CTriggerOnce |
![]() |
trigger_once
is a brush entity available in all Source games. 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
- Name (targetname) <string>[ Edit ]
- The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g.
parentname
ortarget
).
Also displayed in Hammer's 2D views and Entity Report.See also: Generic Keyvalues, Inputs and Outputs available to all entities
|
Flags
|
Inputs
- Toggle
- Toggles this trigger between enabled and disabled states.
- Enable
- Enable trigger
- Disable
- Disable trigger
- StartTouch (in all games since
) !FGD
- Behave as if the !caller entity had just entered the trigger volume. Accepts non-physical entities.
Note:Will trigger OnStartTouch output and the trigger won't be removed.
Warning:If !caller doesn't exist game will crash
StrataEngine:
- Touch (only in
Strata Source games)
- Behaves as if
!caller
has touched the trigger volume
Outputs
- OnStartTouch
- OnTrigger
- 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.")

