Trigger brush: Difference between revisions
Jump to navigation
Jump to search
Note:The brush is fully solid unlike other trigger entities.
Note:Use func_button instead, it behaves like trigger_brush but is more likely to work on any version of source.
Note:The player events (such as
Code:In code, it is represented by the
m (→FGD Code: This is the only entity that actually uses the InputFilter keyvalue; there's already a base class in base.fgd that func_brush incorrectly uses) |
|||
Line 9: | Line 9: | ||
==Keyvalues== | ==Keyvalues== | ||
{{KV| | {{KV|Input Filter|intn=InputFilter|choices|Used to specify which inputs this entity will accept. | ||
{{KV|Don't alert parent|intn=DontMessageParent|bool|Decides whether to forward OnStartTouch, OnEndTouch outputs or Use input to parented entity}} | :*0 : Allow all inputs | ||
:*1: Ignore Players {{Not in FGD}} | |||
:*2: Ignore NPCs {{Not in FGD}} | |||
:*4: Ignore Pushables {{Not in FGD}} | |||
:*8 : Ignore Touch/Untouch | |||
:*16 : Ignore Use | |||
:*32 : Ignore All}} | |||
{{KV|Don't alert parent|intn=DontMessageParent|bool|Decides whether to forward OnStartTouch, OnEndTouch outputs or Use input to parented entity.}} | |||
{{KV Targetname}} | {{KV Targetname}} | ||
Revision as of 13:03, 12 May 2024

This entity is obsolete. Its use is discouraged. It may only exist/function in older engine branches.
![]() |
---|
CTriggerBrush |
![]() |
trigger_brush
is an e2 available in all Source games. Deprecated entity during the development of Half-Life 2, its sole difference compared to other entities is that a
OnUse
output exists.



game_playerdie
) are usable by all entities and not just by this entity, despite common misconception. The list of those is now available on the Targetname page.
CTriggerBrush
class, defined in the modelentities.cpp
file.Keyvalues
- Input Filter (InputFilter) <choices>
- Used to specify which inputs this entity will accept.
- Don't alert parent (DontMessageParent) <boolean>
- Decides whether to forward OnStartTouch, OnEndTouch outputs or Use input to parented entity.
- 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
Inputs
EnableDisable:
- Enable / Disable
- Enable/disable this entity from performing its task. It might also disappear from view.
- Use
- Fires the OnUse output.
Outputs
- OnUse
- Fired when the
Use
input is given.
- OnStartTouch
- Fired when an entity starts touching this trigger. The touching entity must pass this trigger's filters to cause this output to fire.
- OnEndTouch
- Fired when an entity stops touching this trigger. Only entities that passed this trigger's filters will cause this output to fire.
FGD Code
@SolidClass base(Targetname, Parentname, Global, Inputfilter, EnableDisable) = trigger_brush
[
DontMessageParent(integer) : "Don't alert parent" : 0 : "When 0 forwards OnStartTouch, OnEndTouch outputs or Use input to parented entity"
input Use(void) : "Fires the OnUse output."
output OnUse(void) : "Fired when the Use input is given. "
output OnStartTouch(void) : "Fired when an entity starts touching this trigger. The touching entity must pass this trigger's filters to cause this output to fire."
output OnEndTouch(void) : "Fired when an entity stops touching this trigger. Only entities that passed this trigger's filters will cause this output to fire."
]