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)
(-changed fgd edit, kept only the relevant stuff)
Line 2: Line 2:


{{warning|[[AABB]] is used for LOS obscuring, so clipping or rotating brushes does not change a brush's size as one expects.}}
{{warning|[[AABB]] is used for LOS obscuring, so clipping or rotating brushes does not change a brush's size as one expects.}}
{{note|The FGD entry is setup incorrectly!}}


== Keyvalues ==
== Keyvalues ==
{{Note| 1 and 0 respectively should be always chosen when using this entity}}
{{KV Targetname}}


{{KV|Solidity|intn=Solidity|choices|Used to control the solidity/collision of these brushes.
== FGD Enhancement ==
:*0: Toggle - The solidity can be toggled together with its visibility.
Open <code>steamapps\common\Left 4 Dead 2\bin\left4dead2.fgd</code> and replace the <code>func_block_charge</code> section.
:*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 ==
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.
<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"
]
//Solidity added because it compiles solid without these lines.
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}}
{{clr}}

Revision as of 14:21, 28 September 2022

Template:L4d2 brush It forbids an AI Charger to charge when obscuring LOS with targeted player. AI Chargers however will still run and punch at targets.

Warning.pngWarning:AABB is used for LOS obscuring, so clipping or rotating brushes does not change a brush's size as one expects.

Keyvalues

Name (targetname) <string>[ Edit ]
The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g. parentname or target).
Also displayed in Hammer's 2D views and Entity Report.
See also:  Generic Keyvalues, Inputs and Outputs available to all entities

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"
]