Trigger brush: Difference between revisions
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		 
 Note:The brush is fully solid unlike other trigger entities.
Note:The brush is fully solid unlike other trigger entities. 
 Note:Use func_button instead to detect players using +use, it behaves like trigger_brush but is more likely to work on any version of Source.
Note:Use func_button instead to detect players using +use, it behaves like trigger_brush but is more likely to work on any version of Source.
	
		
	
|  (→Keyvalues:  nofgd? Was this in any fgd ?) | No edit summary | ||
| Line 42: | Line 42: | ||
| ]</syntaxhighlight> | ]</syntaxhighlight> | ||
| == Convars == | |||
| {{varcom|start}} | |||
| {{varcom|showtriggers|0|bool|If this is true when this entity spawns its brush will be visible.}} | |||
| {{varcom|end}} | |||
| == See also == | == See also == | ||
| *[[logic_eventlistener]] | *[[logic_eventlistener]] | ||
Revision as of 08:19, 26 April 2025

This entity is obsolete. Its use is discouraged. It may only exist/function in older engine branches.
|  Class hierarchy | 
|---|
| CTriggerBrush | 
|  modelentities.cpp | 
trigger_brush  is a   brush entity  available in all  Source games. Deprecated entity during the development of Half-Life 2, its sole difference compared to other entities is that a
 Source games. Deprecated entity during the development of Half-Life 2, its sole difference compared to other entities is that a OnUse output ↓ exists which may be useful when combined with player event targetnames (such as game_playerdie).
 Note:The brush is fully solid unlike other trigger entities.
Note:The brush is fully solid unlike other trigger entities. Note:Use func_button instead to detect players using +use, it behaves like trigger_brush but is more likely to work on any version of Source.
Note:Use func_button instead to detect players using +use, it behaves like trigger_brush but is more likely to work on any version of Source.Keyvalues
- Name (targetname) <string>[ Edit ]
- The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g. parentnameortarget).
 Also displayed in Hammer's 2D views and Entity Report.See also: Generic Keyvalues, Inputs and Outputs available to all entities
- Input Filter (InputFilter) <choices>
- Used to specify which inputs this entity will accept.
- 0: Allow all inputs
- 1: Ignore Players
- 2: Ignore NPCs
- 4: Ignore Pushables
- 8: Ignore Touch/Untouch
- 16: Ignore Use
- 32: Ignore All
 
- Don't alert parent (DontMessageParent) <boolean>
- Decides whether to forward OnStartTouch, OnEndTouch outputs or Use input to parented entity.
Inputs
- Use
- Fires the OnUse output.
EnableDisable:
- Enable / Disable
- Enable/disable this entity from performing its task. It might also disappear from view.
Outputs
- OnUse
- !activator = activator of the Use input
 !caller = this entity
 Fired when theUseinput is given.
- OnStartTouch
- !activator = entity that touched this trigger
 !caller = this entity
 Fired when an entity starts touching this trigger. The touching entity must pass this trigger's InputFilter to cause this output to fire.
- OnEndTouch
- !activator = entity that stopped touching this trigger (may be NULL if the entity was killed)
 !caller = this entity
 Fired when an entity stops touching this trigger. Only entities that passed this trigger's InputFilter will cause this output to fire.
FGD Code
Todo: add InputFilter keyvalue
@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 InputFilter to cause this output to fire."
	output OnEndTouch(void) : "Fired when an entity stops touching this trigger. Only entities that passed this trigger's InputFilter will cause this output to fire."
]
Convars
| Cvar/Command | Parameters or default value | Descriptor | Effect | 
|---|---|---|---|
| showtriggers | 0 | bool | If this is true when this entity spawns its brush will be visible. | 

