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

Trigger: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
 
(30 intermediate revisions by 14 users not shown)
Line 1: Line 1:
==Entity Description==
{{LanguageBar}}
'''Trigger''' is a generic trigger entity.
{{ent not in fgd|nolink=1}}
'''Trigger''' entities are spatial volumes which trigger outputs depending on what touch them and how.
{{CD|CBaseTrigger|file1=triggers.cpp}} [[Category:CBaseTrigger]]
{{this is a|brush entity|name=trigger}} It's a generic trigger [[entity]] from which all [[triggers]] inherit.
{{note|Mostly useless entity that exists most likely for debugging purposes (similarly to {{ent|funCBaseFlex}}). During spawning important method [https://github.com/ValveSoftware/source-sdk-2013/blob/0d8dceea4310fde5706b3ce1c70609d72a38efdf/mp/src/game/server/triggers.cpp#L324 InitTrigger] is not called which would normally set up its model and other collision related properties}}


The two most common triggers are:
== See also ==
*[[trigger_once]]
* [[Triggers]]
*[[trigger_multiple]]
* {{ent|trigger_multiple}}
Several other trigger entities [[List_of_entities#Trigger_Entities|also exist]].
* {{ent|trigger_once}}
 
==Keyvalues==
* {{kv triggeronce}}
==Flags==
* {{fl triggeronce}}
==Inputs==
* {{i triggeronce}}
==Outputs==
* {{o triggeronce}}
* '''OnEndTouch'''
: Fired when an entity stops touching this trigger. Only entities that passed this trigger's filters will cause this output to fire.
* '''OnEndTouchAll'''
: Fires when an entity stops touching this trigger, and no other entities are touching it. Only entities that passed this trigger's filters are considered.
 
[[Category:Entities]] [[Category:Glossary]]

Latest revision as of 03:54, 29 June 2025

English (en)中文 (zh)Translate (Translate)
Icon-NotInFGD.png
This entity is not in the FGD by default.
It should not be put directly in a map.
C++ Class hierarchy
CBaseTrigger
CBaseToggle
CBaseEntity
C++ triggers.cpp

trigger is a brush entity available in all Source Source games. It's a generic trigger entity from which all triggers inherit.

Note.pngNote:Mostly useless entity that exists most likely for debugging purposes (similarly to funCBaseFlex). During spawning important method InitTrigger is not called which would normally set up its model and other collision related properties

See also