Npc headcrab: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 1: Line 1:
{{Entitytabs|Npc headcrab|goldsrc=1|source=1|source2=1|main=source}}
{{Entitytabs|Npc headcrab|goldsrc=1|source=1|source2=1|main=source}}[[File:headcrab.jpg|right|250px|{{autolang|Headcrab|ru=Хэдкраб}}]]
{{lang|npc headcrab}}
{{entity|type=e0|npc_headcrab|series=Half-Life 2}}{{multipage}}
{{entity|type=e0|npc_headcrab|series=Half-Life 2}}
[[Image:headcrab.jpg|right|250px|Headcrab]]
These are the classic, slow-moving headcrabs. They attack by jumping at the player's head and inflict a nominal amount of damage. Almost any weapon can dispatch them easily.
 
Commonly found attached to a [[Npc_zombie|zombie]] host body, they will detach if that host is sufficiently damaged below the head.
 
There are several other [[headcrab]] variants and associated zombie types.
 
See also [[env_headcrabcanister]] which is a mortar shell containing a payload of headcrabs. The mortar shell inflicts damage within a radius of where it lands and releases headcrabs after impact. Triggers and entity options offer control over impact damage and when the headcrabs are released, among other options.
{{ModernPlacementTip|Classic headcrabs can be paired with their [[npc_headcrab_fast|fast-moving]] or [[npc_headcrab_black|poisonous]] relatives to make it more interesting.}}
{{ModernPlacementTip|Avoid the cliche of placing headcrabs in vents; they would likely be more of an annoyance than an improvement on gameplay.}}
 
{{NPCNote}}
{{code class|CHeadcrab|npc_headcrab.cpp}}
 
== Dedicated Console Variables ==
;sk_headcrab_health <[[int]]>
: A headcrab's spawn health.
;sk_headcrab_melee_dmg <[[int]]>
: Melee damage.
 
== Keyvalues ==
{{KV BaseNPC}}
{{KV Parentname}}
{{KV|Start burrowed|bool|Should this npc start burrowed? Will unburrow via input or if an enemy gets near.}}
 
== Flags ==
{{Fl BaseNPC}}
* 65536 : Start hidden
* 131072 :  Start hanging from ceiling
 
== Inputs ==
{{I BaseNPC}}
 
{{I Parentname}}
 
{{IO|StartHangingFromCeiling|Start hanging from ceiling.|}}
 
{{IO|DropFromCeiling|Drop if hanging from ceiling.|}}
 
== Outputs ==
{{O BaseNPC}}
 
==See also==
*[[env_headcrabcanister]]
 
[[Category:Half-Life 2 NPCs|H]]
[[Category:Half-Life 2 NPCs|H]]
[[Category:Headcrabs]]
[[Category:Headcrabs]]

Revision as of 11:23, 28 July 2023