Npc headcrab: Difference between revisions
Gameplayer (talk | contribs) No edit summary |
SirYodaJedi (talk | contribs) (Fix tabs) |
||
Line 1: | Line 1: | ||
{{LanguageBar}} | {{LanguageBar}} | ||
{{tabs| | {{tabs|monster_headcrab|goldsrc=1|hls=1||custom1=npc_headcrab|custom1alt=Source Engine|custom2=npc_headcrab (Source 2)|custom2alt=Source 2}} | ||
[[File:headcrab.jpg|right|250px|Headcrab]] | [[File:headcrab.jpg|right|250px|Headcrab]] | ||
{{CD|CHeadcrab|file1=npc_headcrab.cpp}} | {{CD|CHeadcrab|file1=npc_headcrab.cpp}} |
Revision as of 11:45, 1 September 2024
![]() |
---|
CHeadcrab |
![]() |
npc_headcrab
is a point entity available in Half-Life 2,
Half-Life 2: Episode One,
Half-Life 2: Episode Two,
Half-Life 2: Deathmatch, and
Black Mesa.
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 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.



Dedicated Console Variables
- sk_headcrab_health <int>
- A headcrab's spawn health.
- sk_headcrab_melee_dmg <int>
- Melee damage.
- g_debug_headcrab <bool>
- Toggle headcrab debugging.
- sk_headcrab_min_jump_dist <int>
- Headcrab min jump distance. Only in Black Mesa 2012.
- sk_headcrab_max_jump_dist <int>
- Headcrab max jump distance. Only in Black Mesa 2012.
- sv_headcrab_can_latch_on_player <bool>
- Toggles headcrab's ability to attach player's head (if player catches it with head). Only in Black Mesa 2012. Requires this texture to display properly as the texture has been removed.
Keyvalues
- Parent (parentname) <targetname>
- Specifies a movement parent. An entity will maintain its initial offset from its parent. An attachment point can be added to the end of the name, separated by a comma.
BaseHeadcrab:
- Start burrowed (startburrowed) <boolean>
- Should this npc start burrowed? Will unburrow via input or if an enemy gets near.
Note:If a headcrab is burrowed, it cannot be damaged. Use Kill input if needing to remove such headcrab.
Flags
- Start hidden : [65536]
- Start hanging from ceiling : [131072]
Inputs
- Burrow !FGD
- Burrow. If no burrow points within 512 units, does nothing.
- BurrowImmediate !FGD
- Burrow immediate.
- Unburrow !FGD
- Unburrow.
- StartHangingFromCeiling
- Start hanging from ceiling.
- DropFromCeiling
- Drop if hanging from ceiling.
- SetParent <string >
- Move with this entity. See Entity Hierarchy (parenting).
- SetParentAttachment <string >
- Change this entity to attach to a specific attachment point on its parent. The entity will teleport so that the position of its root bone matches that of the attachment. Entities must be parented before being sent this input.
- SetParentAttachmentMaintainOffset <string >
- As above, but without teleporting. The entity retains its position relative to the attachment at the time of the input being received.
- ClearParent
- Removes this entity from the the movement hierarchy, leaving it free to move independently.
Outputs
|
See also
- CBaseAnimating
- Point entities
- Non-internal Half-Life 2 entities
- Half-Life 2 entities
- Half-Life 2 point entities
- Non-internal Half-Life 2: Episode One entities
- Half-Life 2: Episode One entities
- Half-Life 2: Episode One point entities
- Non-internal Half-Life 2: Episode Two entities
- Half-Life 2: Episode Two entities
- Half-Life 2: Episode Two point entities
- Non-internal Half-Life 2: Deathmatch entities
- Half-Life 2: Deathmatch entities
- Half-Life 2: Deathmatch point entities
- Non-internal Black Mesa entities
- Black Mesa entities
- Black Mesa point entities
- NPC entities
- Half-Life 2 NPCs
- Headcrabs