Func block charge: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(-removed useless information about keyvalues, inputs outputs and removed the gif because last stand usage of this entity is wrong and shouldn't be used as example. Will add different gif later)
(Rewrite Template:Lang to Template:LanguageBar. This action was performed by a bot.)
 
(17 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{{l4d2 brush|func_block_charge}} It forbids an AI Charger to charge when obscuring LOS with targeted player. AI Chargers however will still run and punch at targets.  
{{LanguageBar}}{{CD|CFuncBrush|CBaseEntity}}
{{this is a|brush entity|name=func_block_charge|game=Left 4 Dead 2|sprite=Toolsnodraw.gif}} Chargers won't charge at players to which line of sight is blocked by this entity.


{{warning|[[AABB]] is used for LOS obscuring, so clipping or rotating brushes does not change a brush's size as one expects.}}
{{AABBwarning}}
{{note|The FGD entry is setup incorrectly!}}
{{ModernPlacementTip|See through fences, bridges where charger could try charging over a gap diagonally to you}}
{{AltNames|name1=func_brush|misc=This entity is just func_brush with classname func_block_charge. It's the [[charger]]'s behaviour that makes him not start charge through entities with classname func_block_charge}}
{{ModernConfusion|This is not meant to block any sort of movement since it's not a solid brush that would block exclusively charging chargers.}}


== Keyvalues ==
== Image demonstration ==
{{Note| 1 and 0 respectively should be always chosen when using this entity}}
[[File:Func block charge example.png|600px|center]]


{{KV|Solidity|intn=Solidity|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}}
{{KV|Solid BSP|intn=solidbsp|bool|Set this to BSP if the player seems to rotate oddly relative to the surface.
:*0: [[VPhysics]] - Always choose this one for this entity
:*1: BSP ([[QPhysics]])}}


== FGD Edits ==
[[File:Func block charge example2.png|600px|center]]
Here is a modified FGD Entry that keeps only the parts that seem to be used, based on data that has been filled out in original valve maps. Open <code>steamapps\common\Left 4 Dead 2\bin\left4dead2.fgd</code> and replace the <code>func_block_charge</code> section.
{{clr}}
== FGD Enhancement ==
Open <code>steamapps\common\Left 4 Dead 2\bin\left4dead2.fgd</code> and replace the <code>func_block_charge</code> section.
<source lang=js>
<source lang=js>
//Func_block_charge edits
@SolidClass base(Targetname) = func_block_charge : "AI Chargers will not charge through this brush. (Based on AABB!)"
@SolidClass base(Targetname, Parentname, Origin, Global, EnableDisable) = func_block_charge : "AI Chargers will not charge through this brush. (Based on Bounding Box!)"
[
[
StartDisabled(choices) : "Start Disabled" : 0 =
Solidity(integer) readonly : "Solidity" : 1 : "Should be always never solid"
[
]
0 : "No"
</source>
1 : "Yes"
 
]
== See Also ==
//Solidity added because it compiles solid without these lines.
* {{ent|charger}}
solidbsp(choices) : "Solid BSP" : 0 : "Set this if this brush is in heirarchy with a moving object of some kind, and the player can stand on this brush." =
[
0 : "No"
1 : "Yes"
]
Solidity(choices) : "Solidity" : 1 : "Used to control the solidity/collision of these brushes." =
[
0 : "Toggle"
1 : "Never Solid"
2 : "Always Solid"
]
]</source>
{{clr}}

Latest revision as of 17:54, 18 July 2025

English (en)Translate (Translate)
C++ Class hierarchy
CFuncBrush
CBaseEntity
Toolsnodraw.gif

func_block_charge is a brush entity available in Left 4 Dead 2 Left 4 Dead 2. Chargers won't charge at players to which line of sight is blocked by this entity.

Warning.pngWarning:This entity applies its effect based on its AABB instead of its brush model. [ Edit ]
PlacementTip.gifPlacement Tip:See through fences, bridges where charger could try charging over a gap diagonally to you
AltNames.pngAltNames: This entity is also tied to func_brush. This entity is just func_brush with classname func_block_charge. It's the charger's behaviour that makes him not start charge through entities with classname func_block_charge
Warning.pngRisk of Confusion:This is not meant to block any sort of movement since it's not a solid brush that would block exclusively charging chargers.

Image demonstration

Func block charge example.png


Func block charge example2.png

FGD Enhancement

Open steamapps\common\Left 4 Dead 2\bin\left4dead2.fgd and replace the func_block_charge section.

@SolidClass base(Targetname) = func_block_charge : "AI Chargers will not charge through this brush. (Based on AABB!)"
[
	Solidity(integer) readonly : "Solidity" : 1 : "Should be always never solid"
]

See Also