trigger_once
From Valve Developer Community
This 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.
Contents |
See also
Keyvalues
TriggerOnce:
- Filter Name
<targetname> - Filter to use to see if activator triggers me. See filter_activator_name for details.
Origin:
- Origin
<origin> - The position of this entity's center in the world. Rotating entities typically rotate around their origin.
EnableDisable:
- Start Disabled
<bool> - Stay dormant until activated (probably with the Enable input).
Parentname:
- Parent
<targetname> - Specifies the targetname of this entity's movement parent. Entities with parents move with their parent.
Global:
- Global Entity Name
<string> - Name by which this entity is linked to another entity in a different map. When the player transitions to a new map, entities in the new map with global names matching entities in the previous map will have the previous map's state copied over to them.
Targetname:
- Name <string>
- The targetname other entities refer to this entity by.
Flags
Applies to clients (players)
- Applies to NPCs
- Applies to pushables
- Applies to physics objects
- Applies to player ally NPCs
- Applies to clients in vehicles
- Applies to everything
- Applies to clients not in vehicles
- Applies to physics debris
Inputs
TriggerOnce:
-
Toggle - Toggles this trigger between enabled and disabled states.
EnableDisable:
-
Enable -
Disable - Enable/disable this entity from performing its task. It might also disappear from view.
Parentname:
-
SetParent <targetname> - Move with this entity. See Entity Hierarchy (parenting).
-
SetParentAttachment <string> - Attach to a named attachment on the current parent. The entity will teleport so that the position of its root bone matches that of the attachment.
-
SetParentAttachmentMaintainOffset <string> - As above, but without teleporting. The entity retains its position relative to the attachment at the time of the input being received.
-
ClearParent - Removes this entity from its current movement hierarchy.
Targetname:
-
Kill - Removes this entity from the world.
-
KillHierarchy - Removes this entity and all its children from the world.
-
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> -
FireUser1toFireUser4 - Fire the
OnUseroutputs; see User Inputs and Outputs.
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 whenever the trigger is activated. (activator is the activator)
Targetname:
-
OnUser1toOnUser4 - Fired in response to the
FireUserinputs; see User Inputs and Outputs. -
OnKilled(New with Left 4 Dead) - Fired when the entity is killed and removed from the game.
