Func brush: Difference between revisions
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		
 
 Note:The brush can be partly entered about 0.5 units. Other brush entities don't seem to behave this way (observed in
Note:The brush can be partly entered about 0.5 units. Other brush entities don't seem to behave this way (observed in  by placing 2 brushes flush next to each other, making one func_brush and then when walking along them you'll get stopped at the point they meet which won't happen if for example func_wall_toggle is used)
 by placing 2 brushes flush next to each other, making one func_brush and then when walking along them you'll get stopped at the point they meet which won't happen if for example func_wall_toggle is used)
Setting
 Note:For Keyvalues and Inputs affecting brush rendering, see Brush entity/Rendering related keyvalues and inputs
Note:For Keyvalues and Inputs affecting brush rendering, see Brush entity/Rendering related keyvalues and inputs
		
	
| m (→Keyvalues) | SirYodaJedi (talk | contribs)  No edit summary | ||
| (33 intermediate revisions by 5 users not shown) | |||
| Line 1: | Line 1: | ||
| {{ | {{LanguageBar}} | ||
| {{tabsBar|main=s2|base=func_brush}} | |||
| {{CD|CFuncBrush|file1=modelentities.cpp}} | |||
| {{toc-right}} | |||
| {{preserved entity}} | |||
| {{this is a|brush entity|name=func_brush}} It's a generic brush entity with various features. | |||
| It combines the functions of {{ent|func_wall}}, {{ent|func_illusionary}}, and {{ent|func_wall_toggle}} from {{quake|2}} and {{goldsrc|2}}. The older entities can still be used, for an insignificant amount of memory saved. | |||
| It combines the functions of {{ent|func_wall}}, {{ent|func_illusionary}} and {{ent|func_wall_toggle}} from  | |||
| {{note|The brush can be partly entered about 0.5 units. Other brush entities don't seem to behave this way (observed in {{l4d2}} by placing 2 brushes flush next to each other, making one func_brush and then when walking along them you'll get stopped at the point they meet which won't happen if for example func_wall_toggle is used)<br/> | |||
| Setting <code>solidbsp</code> keyvalue to 1 seems to fix the issue.}} | |||
| ==Keyvalues== | ==Keyvalues== | ||
| {{KV|Solidity|intn=Solidity|choices|Used to control the solidity/collision of these brushes. | {{Brush rendering note}} | ||
| {{KV Targetname}} | |||
| {{KV|Solidity|intn=Solidity|integer choices|Used to control the solidity/collision of these brushes. | |||
| :*0: Toggle - The solidity can be toggled together with its visibility. | :*0: Toggle - The solidity can be toggled together with its visibility. | ||
| :*1: Never Solid | :*1: Never Solid | ||
| :*2: Always Solid}} | :*2: Always Solid}} | ||
| :{{bug|{{ent|npc_combine_s}} can walk through no matter what type of solidity is set by using {{ent|scripted_sequence}}}} | |||
| {{KV|Solid BSP|intn=solidbsp|bool|Set this to BSP if the player seems to rotate oddly relative to the surface. | {{KV|Solid BSP|intn=solidbsp|bool|Set this to BSP if the player seems to rotate oddly relative to the surface. | ||
| :*0: [[VPhysics]] | :*0: [[VPhysics]] | ||
| :*1: BSP ([[QPhysics]])}} | :*1: BSP ([[QPhysics]])}} | ||
| {{KV|NPC class excluded from collisions|intn=excludednpc|classname|If an NPC classname (i.e. {{ent|npc_zombie}}) is specified here, NPCs of that type won't collide with these brushes.}} | {{KV|NPC class excluded from collisions|intn=excludednpc|classname|If an NPC classname (i.e. {{ent|npc_zombie}}) is specified here, NPCs of that type won't collide with these brushes.   | ||
| :{{Note|Not usable with anything in {{l4ds}}}} }} | |||
| {{KV|Invert NPC class exclusion|intn=invert_exclusion|bool|If set, then the excluded NPC class will consider this brush solid, and all ''other'' NPC classes will consider it non-solid.}} | {{KV|Invert NPC class exclusion|intn=invert_exclusion|bool|If set, then the excluded NPC class will consider this brush solid, and all ''other'' NPC classes will consider it non-solid.}} | ||
| {{KV  | {{KV|StartDisabled|boolean|intn=StartDisabled|If true brush will start invisible, and if <code>solidity</code> is '''not''' set to <code>Always Solid</code> it will also be non-solid}} | ||
| :{{tip|If '''Solidity''' is ''Toggle'', disabling will also make the entity non-solid.}} | :{{tip|If '''Solidity''' is ''Toggle'', disabling will also make the entity non-solid.}} | ||
| ==Flags== | ==Flags== | ||
| {{fl|2|Ignore player +USE  | {{fl|2|Ignore player +USE|Entity will ignore all {{ent|Use}} inputs, including ones from the player.}} | ||
| ==Inputs== | ==Inputs== | ||
| {{ | {{I|SetExcluded|param=string|Change the NPC class that does not collide with the brush.}} | ||
| {{ | {{I|SetInvert|param=bool|Whether to reverse the NPC class exclusion rule.}} | ||
| {{ | {{I|Enable|Make the brush visible and if <code>solidity</code> is '''not''' set to <code>Never Solid</code> make it '''solid'''}} | ||
| {{I  | {{I|Disable|Make the brush invisible and if <code>solidity</code> is '''not''' set to <code>Always Solid</code> make it '''non-solid'''  | ||
| {{ | :{{warning|The invisiblity is achieved by applying [[EF_NODRAW]] which makes the entity ignored on client therefore if solidity was Always Solid moving against the brush collision will feel jittery {{todotest|l4d2}}}}}} | ||
| {{I  | {{I|Toggle|Toggles the enabled state of the entity|nofgd=1}} | ||
| == | == See Also == | ||
| {{ | * {{ent|func_illusionary}} | ||
| * {{ent|func_wall_toggle}} | |||
| * {{ent|func_wall}} | |||
| * {{ent|func_detail}} | |||
Latest revision as of 07:46, 4 May 2025
|  Class hierarchy | 
|---|
| CFuncBrush | 
|  modelentities.cpp | 

This is a preserved entity in 




If the game has round restart mechanics this entity may not behave as expected.





If the game has round restart mechanics this entity may not behave as expected.
func_brush  is a   brush entity  available in all  Source games. It's a generic brush entity with various features.
 Source games. It's a generic brush entity with various features.
It combines the functions of func_wall, func_illusionary, and func_wall_toggle from  Quake and
 Quake and  GoldSrc. The older entities can still be used, for an insignificant amount of memory saved.
 GoldSrc. The older entities can still be used, for an insignificant amount of memory saved.
 Note:The brush can be partly entered about 0.5 units. Other brush entities don't seem to behave this way (observed in
Note:The brush can be partly entered about 0.5 units. Other brush entities don't seem to behave this way (observed in  by placing 2 brushes flush next to each other, making one func_brush and then when walking along them you'll get stopped at the point they meet which won't happen if for example func_wall_toggle is used)
 by placing 2 brushes flush next to each other, making one func_brush and then when walking along them you'll get stopped at the point they meet which won't happen if for example func_wall_toggle is used)Setting
solidbsp keyvalue to 1 seems to fix the issue.Keyvalues
 Note:For Keyvalues and Inputs affecting brush rendering, see Brush entity/Rendering related keyvalues and inputs
Note:For Keyvalues and Inputs affecting brush rendering, see Brush entity/Rendering related keyvalues and inputs- 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
- Solidity (Solidity) <integer choices>
- Used to control the solidity/collision of these brushes.
- 0: Toggle - The solidity can be toggled together with its visibility.
- 1: Never Solid
- 2: Always Solid
 
 Bug:npc_combine_s can walk through no matter what type of solidity is set by using scripted_sequence  [todo tested in ?] Bug:npc_combine_s can walk through no matter what type of solidity is set by using scripted_sequence  [todo tested in ?]
- Solid BSP (solidbsp) <boolean>
- Set this to BSP if the player seems to rotate oddly relative to the surface.
- NPC class excluded from collisions (excludednpc) <classname>
- If an NPC classname (i.e. npc_zombie) is specified here, NPCs of that type won't collide with these brushes.
- Invert NPC class exclusion (invert_exclusion) <boolean>
- If set, then the excluded NPC class will consider this brush solid, and all other NPC classes will consider it non-solid.
- StartDisabled (StartDisabled) <boolean>
- If true brush will start invisible, and if solidityis not set toAlways Solidit will also be non-solid
 Tip:If Solidity is Toggle, disabling will also make the entity non-solid. Tip:If Solidity is Toggle, disabling will also make the entity non-solid.
Flags
- Ignore player +USE : [2]
- Entity will ignore all Use inputs, including ones from the player.
Inputs
- SetExcluded <string>
- Change the NPC class that does not collide with the brush.
- SetInvert <boolean>
- Whether to reverse the NPC class exclusion rule.
- Enable
- Make the brush visible and if solidityis not set toNever Solidmake it solid
- Disable
- Make the brush invisible and if solidityis not set toAlways Solidmake it non-solid
 Warning:The invisiblity is achieved by applying EF_NODRAW which makes the entity ignored on client therefore if solidity was Always Solid moving against the brush collision will feel jittery  (tested in: l4d2) Warning:The invisiblity is achieved by applying EF_NODRAW which makes the entity ignored on client therefore if solidity was Always Solid moving against the brush collision will feel jittery  (tested in: l4d2)
- Toggle !FGD
- Toggles the enabled state of the entity



























