Func block charge: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (→‎top: Unicodifying, replaced: {{language subpage → {{langsp)
(-description reword, image examples)
Line 1: Line 1:
<!-- When this page is updated to {{langsp}} or {{langsp}} instead of {{lang}}, please move {{this is a}} to the base page, as it is automatically translated. -->{{lang}}{{CD|CFuncBrush|CBaseEntity}}
<!-- When this page is updated to {{langsp}} or {{langsp}} instead of {{lang}}, please move {{this is a}} to the base page, as it is automatically translated. -->{{lang}}{{CD|CFuncBrush|CBaseEntity}}
[[File:Toolsnodraw.gif|left]]
[[File:Toolsnodraw.gif|left]]
{{this is a|e2|name=func_block_charge|game=Left 4 Dead 2}} It forbids an AI Charger to charge when obscuring LOS with targeted player. AI Chargers however will still run and punch at targets.  
{{this is a|e2|name=func_block_charge|game=Left 4 Dead 2}} 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.<br>
{{warning|[[AABB]] is used for LOS obscuring, so clipping or rotating brushes does not change a brush's size as one expects.<br>
Line 8: Line 8:
{{ModernPlacementTip|See through fences, bridges where charger could try charging over a gap diagonally to you}}
{{ModernPlacementTip|See through fences, bridges where charger could try charging over a gap diagonally to you}}
{{Note|This entity in code is most likely just func_brush with classname keyvalue changed to func_block_charge. For example firing AddOutput "classname func_block_charge" on a func_brush makes it behave like func_block_charge}}
{{Note|This entity in code is most likely just func_brush with classname keyvalue changed to func_block_charge. For example firing AddOutput "classname func_block_charge" on a func_brush makes it behave like 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 ==
{{KV Targetname}}
[[File:Func block charge example.png|600px|center]]


[[File:Func block charge example2.png|600px|center]]
{{clr}}
== FGD Enhancement ==
== FGD Enhancement ==
Open <code>steamapps\common\Left 4 Dead 2\bin\left4dead2.fgd</code> and replace the <code>func_block_charge</code> section.
Open <code>steamapps\common\Left 4 Dead 2\bin\left4dead2.fgd</code> and replace the <code>func_block_charge</code> section.
Line 20: Line 24:
]
]
</source>
</source>
{{clr}}
 
== See Also ==
* {{ent|charger}}

Revision as of 09:49, 19 February 2024

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

func_block_charge is an e2 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:AABB is used for LOS obscuring, so clipping or rotating brushes does not change a brush's size as one expects.

Diagonal walls will always be ignored, ad it will take the furthest out corners of the diagonal walls and create one huge box around all of it. That box will be your brush entity.

If you need a large diagonal brush, you must create multiple small square entities aligned diagonally.
PlacementTip.gifPlacement Tip:See through fences, bridges where charger could try charging over a gap diagonally to you
Note.pngNote:This entity in code is most likely just func_brush with classname keyvalue changed to func_block_charge. For example firing AddOutput "classname func_block_charge" on a func_brush makes it behave like 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