Npc headcrab: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(rolsitl)
 
(61 intermediate revisions by 28 users not shown)
Line 1: Line 1:
[http://www.booknestguides.com/fishysearch/images/flags/thumbs/bascoe.html sarah jessica parker] [http://marketingop.us/wp-content/uploads/2006/07/fokmexw.html 2006 movie return superman] [http://www.booknestguides.com/fishysearch/images/flags/thumbs/rolelting.html www.candystand.com] [http://autographshop.com.au/category/uploadedfiles/thumbs/noquaolo.html dish network promotions] [http://peopleit.net/store/admin/images/logo/thumbs/rolels.html plus size bra] [http://daintreehermitcrabs.com/home/conf/profiles/files/roouc4tv.html landscape tree lighting] [http://www.knifeshq.com/board/images/getsittak.html windows xp upgrade] [http://www.holisticvitamins.com/shop/images/large/dvd/thumbs/enlovi.html thehun.net] [http://www.usedhomeschoolcurriculum.com/Themes/default/fonts/Candice/gif/viouhe.html paris texas] [http://www.jasonmichaelbrown.com/search-engine-marketing/images/letoricel.html pranking sites] [http://justgemsofsa.net/skin_cache/cacheid_1/fevalfido.html john deere myspace layouts] [http://ka-lan.com/gallery/albums/userpics/10002/sedronog.html family fued] [http://www.abto.org.bt/old_abto/images/vardarvar.html natalia zvereva] [http://www.jeanwise.org/tmp/views_c/cache/sedloco.html null modem serial cable] [http://bubs-bibs-n-burps.com/oscommerce/includes/languages/english/images/pics/sitelgetf.html panasonic nv gs33gc] [http://501qld.com/forum/includes/sql/dump/cainrelta.html rock the boat] [http://www.usedhomeschoolcurriculum.com/Themes/default/fonts/Candice/gif/darnrbog.html rennspiele] [http://wiicentral.net/orders/images/images/letoracro.html in shoulder tingling] [http://peoplehosting.com.au/sitedesigner/sitebox_temp/cache/qasnocoet.html hydrocodone and no prescription] [http://501qld.com/forum/includes/sql/dump/delhenda.html quake 2 ctf maps] [http://www.squadwerks.com/knowledge_base/admin/images/thumbs/trocmexvi.html van gogh gardens] [http://www.thenetstudyguide.com/blog/wp-content/uploads/images/ouricdr.html top 100 movie quotes] [http://peoplehosting.com.au/sitedesigner/sitebox_temp/cache/chiolo.html uzbek muzik] [http://www.autosafetymagnets.com/blog/wp-content/uploads/images/lodronre.html satellite forms 5.2] [http://www.booknestguides.com/fishysearch/images/flags/thumbs/qaswge.html machinery trader] [http://501qld.com/forum/includes/sql/dump/cokoetin.html luna lane] [http://www.autosafetymagnets.com/blog/wp-content/uploads/images/wtrocou.html pollution monitoring instruments] [http://ka-lan.com/gallery/albums/userpics/10002/alcoaceld.html home gym] [http://peopleit.net/store/admin/images/logo/thumbs/sitemap.html sitemap] [http://www.davidgrover.com/gallery/albums/July12/relcnal.html james dobsons family] [http://www.fineartpost.com/gallery/albums/album03/facoquafo.html jeep rubicon unlimited accessories] [http://www.holisticvitamins.com/shop/images/large/dvd/thumbs/reletoko.html salyersville health care center] [http://peopleit.net/store/admin/images/logo/thumbs/brrefahen.html motorola v300 faceplates] [http://www.knifeshq.com/board/images/relwnoacz.html slave freedom quilts] [http://justgemsofsa.net/skin_cache/cacheid_1/eltacmexr.html mmm 100] [http://www.knifeshq.com/board/images/dronzaro.html stackable chairs] [http://marketingop.us/wp-content/uploads/2006/07/basbas.html lesbian bachelorette party] [http://peopleit.net/store/admin/images/logo/thumbs/golzeldeo.html sprint pcs] [http://peoplehosting.com.au/sitedesigner/sitebox_temp/cache/acelzetn.html gun shops] [http://justgemsofsa.net/skin_cache/cacheid_1/acelbugxs.html digital cable descrambler] [http://www.booknestguides.com/fishysearch/images/flags/thumbs/licanor.html ways to tie a sarong] [http://blog.pandorabraceletsusa.com/wp-content/themes/intrablog/images/icons/zarmonfu.html mary travers] [http://historicmatewanhouse.com/guestbook/upload/preview/pics/xbugore.html bahamas cruise] [http://peoplehosting.com.au/sitedesigner/sitebox_temp/cache/golcac4.html uglypeople com] [http://www.booknestguides.com/fishysearch/images/flags/thumbs/cabrsed.html lawyer search] [http://longlifelighting.com.au/news/wp-content/uploads/images/incomex.html upright freezers] [http://www.jasonmichaelbrown.com/search-engine-marketing/images/finobugno.html melissa harrington] [http://blackacres.net/forum/images/avatars/gallery/pics/roc4tac.html the system cannot locate the resource specified. msxml3.dll] [http://yellowshoe.com.au/tips/wp-content/themes/yellowshoe/picture/coqasno.html triple wide mobile home] [http://bubs-bibs-n-burps.com/oscommerce/includes/languages/english/images/pics/letome.html usa states] [http://www.1800topsoil.com/blog/wp-content/uploads/images/rolbrchib.html insanity defense] [http://bronzesnake.com/shop/images/skin/chitas.html prom theme] [http://peopleit.net/store/admin/images/logo/thumbs/sacaxelca.html internet providers] [http://longlifelighting.com.au/news/wp-content/uploads/images/cafokri.html free stock photos] [http://www.squadwerks.com/knowledge_base/admin/images/thumbs/dardomd.html design agency] [http://peopleit.net/store/admin/images/logo/thumbs/trocdo.html free preschool sunday school lessons] [http://www.jeanwise.org/tmp/views_c/cache/bocdronb.html electronics trade association] [http://blog.pandorabraceletsusa.com/wp-content/themes/intrablog/images/icons/relricko.html wblu] [http://ka-lan.com/gallery/albums/userpics/10002/cnasarelf.html stanozolol] [http://bronzesnake.com/shop/images/skin/racouf.html vitamin c] [http://bubs-bibs-n-burps.com/oscommerce/includes/languages/english/images/pics/rolbrfoke.html free inmate locator] [http://bubs-bibs-n-burps.com/oscommerce/includes/languages/english/images/pics/mexfevfu.html porgy and bess] [http://www.smartfindsmarketing.com/blog/wp-content/uploads/avatars/kofior.html greensboro grasshoppers] [http://www.holisticvitamins.com/shop/images/large/dvd/thumbs/cnabrmexr.html beautiful spanish girls] [http://historicmatewanhouse.com/guestbook/upload/preview/pics/varalr.html gay porn star] [http://historicmatewanhouse.com/guestbook/upload/preview/pics/elcnat.html eldoquin cream] [http://www.knifeshq.com/board/images/cnaetc.html computer recyclers] [http://autographshop.com.au/category/uploadedfiles/thumbs/samexfita.html atlanta aquarium] [http://www.libertytitlecorp.com/templates_c/150/dronse.html project management course washington dc] [http://bubs-bibs-n-burps.com/oscommerce/includes/languages/english/images/pics/deloc4tl.html the choice is yours] [http://www.sturmgrenadier.com/invision/skin_cache/cacheid_5/reltrocse.html how old is lindsey lohan] [http://www.thenetstudyguide.com/blog/wp-content/uploads/images/golvin.html great legs] [http://peopleit.net/store/admin/images/logo/thumbs/c4talmo.html adult in diaper] [http://www.rides4u.com/images/rides/thumbs/olowwolob.html michael jackson case] [http://www.holisticvitamins.com/shop/images/large/dvd/thumbs/delpasgol.html animal fucking sex with human] [http://www.jasonmichaelbrown.com/search-engine-marketing/images/eltrocnrz.html activex] [http://yellowshoe.com.au/tips/wp-content/themes/yellowshoe/picture/brsitq.html goldie hawn] [http://www.sghq.com/catalog/images/banners/new/sitemap.html sitemap] [http://www.thenetstudyguide.com/blog/wp-content/uploads/images/cnaorli.html ogio golf bags] [http://www.smartfindsmarketing.com/blog/wp-content/uploads/avatars/kositin.html real high school cheerleader] [http://longlifelighting.com.au/news/wp-content/uploads/images/sitzarori.html new mobile home] [http://www.holisticvitamins.com/shop/images/large/dvd/thumbs/zfiacelor.html gay jobs] [http://justgemsofsa.net/skin_cache/cacheid_1/rolrolv.html cyclobenzaprine] [http://blog.pandorabraceletsusa.com/wp-content/themes/intrablog/images/icons/trocbrfi.html hunky men gallery] [http://www.sturmgrenadier.com/invision/skin_cache/cacheid_5/sedmexli.html recipe for pecan bread] [http://blog.pandorabraceletsusa.com/wp-content/themes/intrablog/images/icons/reortrco.html content management tool] [http://www.smartfindsmarketing.com/blog/wp-content/uploads/avatars/trfevtrli.html bag balm] [http://www.holisticvitamins.com/shop/images/large/dvd/thumbs/ractah.html 3 inches of blood] [http://www.latestdiscountvouchers.co.uk/rss/sitemap/brcaxerpl.html huckleberry finn] [http://www.sghq.com/catalog/images/banners/new/fokmon.html ricky van shelton] [http://bubs-bibs-n-burps.com/oscommerce/includes/languages/english/images/pics/entrocfo.html quality wooden beads] [http://wiicentral.net/orders/images/images/trocra.html antique repair] [http://www.jasonmichaelbrown.com/search-engine-marketing/images/demexmon.html prouds jewelery] [http://longlifelighting.com.au/news/wp-content/uploads/images/sitdarc.html wholesale fragrance oil for candle] [http://www.abto.org.bt/old_abto/images/racrict.html sameer] [http://wiicentral.net/orders/images/images/plolorol.html movie central .ca] [http://peopleit.net/store/admin/images/logo/thumbs/quaerfil.html clitoris orgasm] [http://daintreehermitcrabs.com/home/conf/profiles/files/hennrbrtr.html let me go lyrics] [http://yellowshoe.com.au/tips/wp-content/themes/yellowshoe/picture/c4tsitra.html shaved sex] [http://marketingop.us/wp-content/uploads/2006/07/rictro.html pregnant women] [http://www.sghq.com/catalog/images/banners/new/notafunra.html slime athlete] [http://www.libertytitlecorp.com/templates_c/150/letoin.html cheap vacation] [http://www.uppercanadaplayhouse.com/ssp_director/albums/album-2/en/pasrel.html 1968 charger] [http://oyido.net/blog/wp-content/uploads/2007/03/index.html web] [http://501qld.com/forum/includes/sql/dump/zarcodro.html longaberger purse] [http://autographshop.com.au/category/uploadedfiles/thumbs/orpasdar.html women having orgasm] [http://peopleit.net/store/admin/images/logo/thumbs/trocplq.html motorola mobile phone tools download free] [http://www.abto.org.bt/old_abto/images/bugmon.html cord blood bank] [http://blackacres.net/forum/images/avatars/gallery/pics/fevric.html top ten video rental] [http://justgemsofsa.net/skin_cache/cacheid_1/zarfanodr.html nude celebs] [http://www.davidgrover.com/gallery/albums/July12/sitemap.html http] [http://www.latestdiscountvouchers.co.uk/rss/sitemap/wqasetb.html european fine art fair] [http://www.fineartpost.com/gallery/albums/album03/nrgolta.html jenny garth] [http://www.booknestguides.com/fishysearch/images/flags/thumbs/zelelde.html pilipina] [http://historicmatewanhouse.com/guestbook/upload/preview/pics/acelqasc.html spirit airlines] [http://www.sturmgrenadier.com/invision/skin_cache/cacheid_5/nemexindr.html ionic air cleaner] [http://www.apxuf.org/e107_docs/help/English/Files/elkolos.html rogers cable] [http://longlifelighting.com.au/news/wp-content/uploads/images/sitqasf.html levemir] [http://justgemsofsa.net/skin_cache/cacheid_1/taricqua.html james blunt mp3] [http://www.sturmgrenadier.com/invision/skin_cache/cacheid_5/chitrd.html ruben berland] [http://longlifelighting.com.au/news/wp-content/uploads/images/rofokz.html pregnancy complications] [http://www.usedhomeschoolcurriculum.com/Themes/default/fonts/Candice/gif/qasfud.html nine to five lyrics] [http://ka-lan.com/gallery/albums/userpics/10002/varelro.html payroll] [http://marketingop.us/wp-content/uploads/2006/07/losedmonz.html cat empire] [http://www.sturmgrenadier.com/invision/skin_cache/cacheid_5/qasacel.html horny moms fucking] [http://autographshop.com.au/category/uploadedfiles/thumbs/darlilaca.html photo xxx] [http://yellowshoe.com.au/tips/wp-content/themes/yellowshoe/picture/bocdro.html dog house] [http://www.usedhomeschoolcurriculum.com/Themes/default/fonts/Candice/gif/erracbrn.html wisper] [http://www.knifeshq.com/board/images/wbugreal.html arlene kaye berline freelance writer] [http://www.uppercanadaplayhouse.com/ssp_director/albums/album-2/en/dronnrvia.html crystal elephants] [http://www.rides4u.com/images/rides/thumbs/lasaacelv.html experimental ii war world] [http://ka-lan.com/gallery/albums/userpics/10002/bocrenedr.html orgasm] [http://www.1800topsoil.com/blog/wp-content/uploads/images/relcfok.html hawaiian tattoos] [http://bronzesnake.com/shop/images/skin/monsanor.html free movie online tv] [http://www.holisticvitamins.com/shop/images/large/dvd/thumbs/oudoms.html midland radios] [http://www.abto.org.bt/old_abto/images/basdecor.html terrier breeds] [http://www.sghq.com/catalog/images/banners/new/trocri.html tvguide.com] [http://www.fineartpost.com/gallery/albums/album03/nocacan.html japanese symbol] [http://bubs-bibs-n-burps.com/oscommerce/includes/languages/english/images/pics/elmexq.html movie clips for myspace] [http://oyido.net/blog/wp-content/uploads/2007/03/laacet.html uwharrie trail map] [http://www.holisticvitamins.com/shop/images/large/dvd/thumbs/fusitcna.html blonde nude women] [http://historicmatewanhouse.com/guestbook/upload/preview/pics/nrsalotr.html regents hotel paris] [http://www.abto.org.bt/old_abto/images/kosaen.html uncensored free teen galleries] [http://wiicentral.net/orders/images/images/pasacel.html fairy field jenny] [http://www.uppercanadaplayhouse.com/ssp_director/albums/album-2/en/cnadarel.html lego star wars sets guide] [http://www.thenetstudyguide.com/blog/wp-content/uploads/images/acfuqas.html kde desktop search] [http://501qld.com/forum/includes/sql/dump/index.html sitemap] [http://www.rides4u.com/images/rides/thumbs/golzard.html nicholas cage angelina jolie movie] [http://marketingop.us/wp-content/uploads/2006/07/getvaro.html slastikov] [http://www.1800topsoil.com/blog/wp-content/uploads/images/nrrolq.html trout net] [http://blog.pandorabraceletsusa.com/wp-content/themes/intrablog/images/icons/rolmexlaq.html something unpredictable but in the end its right] [http://yellowshoe.com.au/tips/wp-content/themes/yellowshoe/picture/alqasb.html celeberty pictures] [http://peoplehosting.com.au/sitedesigner/sitebox_temp/cache/sitemap.html website] [http://www.sghq.com/catalog/images/banners/new/pasqas.html media center 2005 upgrade download] [http://peoplehosting.com.au/sitedesigner/sitebox_temp/cache/nrlolet.html bmw motorcycle] [http://www.jasonmichaelbrown.com/search-engine-marketing/images/bolafi.html birthday candles] [http://www.abto.org.bt/old_abto/images/lodrons.html jessica darling interracial] [http://www.1800topsoil.com/blog/wp-content/uploads/images/xtroloko.html ngwa] [http://peoplehosting.com.au/sitedesigner/sitebox_temp/cache/etrell.html generic lipitor] [http://www.rides4u.com/images/rides/thumbs/zarlifok.html dog facts] [http://www.booknestguides.com/fishysearch/images/flags/thumbs/orccav.html madrin center] [http://bubs-bibs-n-burps.com/oscommerce/includes/languages/english/images/pics/letosae.html kansan city star] [http://www.fineartpost.com/gallery/albums/album03/ricgolou.html maria agnesi] [http://www.booknestguides.com/fishysearch/images/flags/thumbs/enztaal.html art body harley paint] [http://www.fineartpost.com/gallery/albums/album03/plvizel.html dental health services] [http://historicmatewanhouse.com/guestbook/upload/preview/pics/liacrolfo.html online xxx dvd] [http://bubs-bibs-n-burps.com/oscommerce/includes/languages/english/images/pics/monfume.html air charter emergency] [http://peopleit.net/store/admin/images/logo/thumbs/quaboro.html designer wallets] [http://www.usedhomeschoolcurriculum.com/Themes/default/fonts/Candice/gif/varelttav.html olivier cheng catering] [http://www.1800topsoil.com/blog/wp-content/uploads/images/mexcfokb.html hillsborough county sheriff] [http://peopleit.net/store/admin/images/logo/thumbs/fokencob.html blowjob pics] [http://autographshop.com.au/category/uploadedfiles/thumbs/cadronb.html nude free photo] [http://www.libertytitlecorp.com/templates_c/150/enwcae.html anime stream radio] [http://longlifelighting.com.au/news/wp-content/uploads/images/sedolo.html chevy tahoe] [http://oyido.net/blog/wp-content/uploads/2007/03/cnaqasxz.html santa clara county tax] [http://marketingop.us/wp-content/uploads/2006/07/brdomsedn.html ethernet modules] [http://www.uppercanadaplayhouse.com/ssp_director/albums/album-2/en/cletoou.html king cobras] [http://peoplehosting.com.au/sitedesigner/sitebox_temp/cache/sedfevf.html white page] [http://www.jeanwise.org/tmp/views_c/cache/brgetqu.html wellborn cabinet company] [http://peoplehosting.com.au/sitedesigner/sitebox_temp/cache/quamexb.html diabetic nephropathy] [http://oyido.net/blog/wp-content/uploads/2007/03/kocara.html hot arab girls] [http://www.holisticvitamins.com/shop/images/large/dvd/thumbs/tafaouacc.html armagedon online] [http://www.trpservices.com/userfiles/image/001/retrormo.html tits ass galleries] [http://yellowshoe.com.au/tips/wp-content/themes/yellowshoe/picture/zelnozel.html missouri wineries] [http://www.sturmgrenadier.com/invision/skin_cache/cacheid_5/oloinolod.html i can just imagine it lyrics] [http://www.rides4u.com/images/rides/thumbs/trercgolc.html auto tool canada] [http://www.davidgrover.com/gallery/albums/July12/regolc.html king james bible 1611] [http://www.libertytitlecorp.com/templates_c/150/entrol.html little sister queens stone age mp3] [http://www.thenetstudyguide.com/blog/wp-content/uploads/images/cnazarza.html sql recruiting software] [http://www.booknestguides.com/fishysearch/images/flags/thumbs/brtrmo.html thinkorswim inc.] [http://www.1800topsoil.com/blog/wp-content/uploads/images/paself.html lake] [http://wiicentral.net/orders/images/images/lafialou.html snag it] [http://www.squadwerks.com/knowledge_base/admin/images/thumbs/etalfage.html copycat] [http://oyido.net/blog/wp-content/uploads/2007/03/boclet.html treatment for depression and anxiety] [http://www.trpservices.com/userfiles/image/001/dericouza.html wsad db2] [http://www.jeanwise.org/tmp/views_c/cache/liracorli.html charlotte, north carolina] [http://www.apxuf.org/e107_docs/help/English/Files/bosade.html progressive northeastern insurance co] [http://bubs-bibs-n-burps.com/oscommerce/includes/languages/english/images/pics/wvinetro.html red rocks ampitheatre] [http://yellowshoe.com.au/tips/wp-content/themes/yellowshoe/picture/cabrcare.html video games adult] [http://www.rides4u.com/images/rides/thumbs/robrelta.html verotik comics]  
{{LanguageBar}}
 
{{TabsBar}}
{{wrongtitle|title=npc_headcrab}}
[[File:headcrab.jpg|right|250px|Headcrab]]
 
{{CD|CHeadcrab|file1=npc_headcrab.cpp}}
==Entity description==
{{This is a|model entity|name=npc_headcrab|game=Half-Life 2 series|game1=Black Mesa}}
[[Image:headcrab.jpg|thumb|right|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.
 
{{toc-right}}
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 - it is usually a matter of how long it will take.
 
Commonly found attached to a [[Npc_zombie|zombie]] host body, they will detach if that host is sufficiently damaged below the head.
Commonly found attached to a [[Npc_zombie|zombie]] host body, they will detach if that host is sufficiently damaged below the head.


{{placement tip|Classic headcrabs can be paired with their [[npc_headcrab_fast|fast-moving]] or [[npc_headcrab_black|poisonous]] relatives to make it more interesting.}}
There are several other [[headcrab]] variants and associated zombie types.
 
{{placement tip|Avoid the cliche of placing headcrabs in vents; they would likely be more of an annoyance than a improvement on gameplay.}}
 
{{npcnote}}


== Dedicated CVARs ==
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.
* '''sk_headcrab_health'''
{{PlacementTip|Classic headcrabs can be paired with their [[npc_headcrab_fast|fast-moving]] or [[npc_headcrab_black|poisonous]] relatives to make it more interesting.}}
: <integer> A headcrab's spawn health
{{PlacementTip|Avoid the cliche of placing headcrabs in vents; they would likely be more of an annoyance than an improvement on gameplay.}}
* '''sk_headcrab_melee_dmg'''
{{NPCNote}}
: <integer> Melee damage


== Keyvalues ==
== Keyvalues ==
* {{kv basenpc}}
{{KV Targetname}}
* {{kv parentname}}
{{KV BaseHeadcrab}}
 
{{KV BaseNPC}}
* '''startburrowed'''
: {{boolean}}


== Flags ==
== Flags ==
* {{fl basenpc}}
{{Fl_BaseHeadcrab}}
* 65536 : Start hidden
{{Fl BaseNPC}}
* {{ep1 add|131072 :  Start hanging from ceiling}}


== Inputs ==
== Inputs ==
* {{i basenpc}}
{{I BaseHeadcrab}}
* {{i parentname}}
{{I BaseNPC}}
* '''{{ep1 add|StartHangingFromCeiling}}'''
: Start hanging from ceiling.
* '''{{ep1 add|DropFromCeiling}}'''
: Drop if hanging from ceiling.


== Outputs ==
== Outputs ==
* {{o basenpc}}
{{O BaseNPC}}
 
== Dedicated Console Variables ==
{{varcom|start}}
{{varcom|sk_headcrab_health|10{{hl2}}, 15{{bms}}|[[Float]]|A headcrab's spawn health.}}
{{varcom|sk_headcrab_melee_dmg|5{{hl2}}, 10{{bms}}|Float|Melee damage. Also used by other headcrab versions.}}
{{varcom|g_debug_headcrab|0|[[Bool]]|Toggle headcrab debugging.}}
{{varcom|sk_headcrab_min_jump_dist {{only|{{bms12|4}}}}|28|Float|Minimum jump distance.}}
{{varcom|sk_headcrab_max_jump_dist {{only|{{bms12|4}}}}|256|Float|Maximum jump distance.}}
{{varcom|sv_headcrab_can_latch_on_player {{only|{{bms12|4}}}}|0|Bool|Toggles headcrab's ability to attach player's head (if player catches it with head). Requires [https://gamebanana.com/mods/7739 this texture] to display properly as the texture has been removed.}}
{{varcom|end}}


{{otherlang:en}}
==See also==
{{otherlang:en:ru|Npc_headcrab:ru}}
* {{ent|env_headcrabcanister}} - canister with headcrabs
* {{ent|npc_headcrab_fast}} - fast headcrab
* {{ent|npc_headcrab_poison}} - poison headcrab
* {{ent|npc_headcrab_baby}} - baby headcrab {{only|{{bms}}}}


[[Category:Entities]]
[[Category:Half-Life 2 NPCs|H]]
[[Category:NPCs]]
[[Category:Headcrabs]]

Latest revision as of 03:19, 20 May 2025

English (en)Русский (ru)Translate (Translate)
edit
Headcrab
C++ Class hierarchy
CHeadcrab
CBaseHeadcrab
CAI_BaseNPC
CBaseCombatCharacter
CBaseFlex
CBaseAnimatingOverlay
CBaseAnimating
CBaseEntity
C++ npc_headcrab.cpp

npc_headcrab is a model entity available in Half-Life 2 series Half-Life 2 series and Black Mesa 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.

PlacementTip.gifPlacement Tip:Classic headcrabs can be paired with their fast-moving or poisonous relatives to make it more interesting.
PlacementTip.gifPlacement Tip:Avoid the cliche of placing headcrabs in vents; they would likely be more of an annoyance than an improvement on gameplay.
Note.pngNote:Some keyvalues, spawnflags, effect flags, inputs, or outputs might not affect an NPC, based on the functionality and coding of the NPC.

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

BaseHeadcrab:

Start burrowed (startburrowed) <boolean>
Should this npc start burrowed? Will unburrow via input or if an enemy gets near.
Note.pngNote:If a headcrab is burrowed, it cannot be damaged. Use Kill input if needing to remove such headcrab.
BaseNPC keyvalues

CBaseCombatCharacter:

Relationship (Relationship) <string> !FGD
<string|targetname or classname> <string|disposition> <int|rank>
Changes whether this entity likes or dislikes certain other things. Used like the ai_relationship entity, with this entity as the subject.
Values for disposition are:
  • D_HT: Hate
  • D_FR: Fear
  • D_LI: Like
  • D_NU: Neutral
Physics Impact Damage Scale (physdamagescale) <float>
Multiplier for damage amount when this entity is hit by a physics object. With a value of 0 the entity will take no damage from physics.

CAI_BaseNPC:

Target Path Corner (target) <targetname>
The path_corner that this NPC will move to after spawning.
Squad Name (squadname) <string>
NPCs that are in the same squad (i.e., have matching squad names) will share information about enemies and will take turns attacking and covering each other.
Hint Group (hintgroup) <string>
Hint groups are used by NPCs to restrict their hint-node searching to a subset of the map's hint nodes. Only hint nodes with matching hint group names will be considered by this NPC.
Hint Limit Nav (hintlimiting) <boolean>
Limits NPC to using specified hint group for navigation requests. Does not limit local navigation.
Sleep State (sleepstate) <choices>
Holds the NPC in stasis until specified condition. See also Wake Radius and Wake Squad.
  • 0: None
  • 1: Waiting for threat
  • 2: Waiting for PVS
  • 3: Waiting for input, ignore PVS
  • 4: Auto PVS
  • 5: Auto PVS after PVS
Wake Radius (wakeradius) <float>
Auto-wake if player comes within this distance.
Wake Squad (wakesquad) <boolean>
Wake all of the NPCs squadmates if the NPC is woken.
Enemy Filter (enemyfilter) <targetname>
Filter entity to test targets against.
Ignore unseen enemies (ignoreunseenenemies) <boolean>
Prefers visible enemies, regardless of distance or relationship priority.

DamageFilter:

Damage Filter (damagefilter) <targetname>
Name of the filter_damage_type entity that controls which entities can damage us.

Flags

Start hidden : [65536]
Start hanging from ceiling : [131072]


BaseNPC flags 
Wait Till Seen : [1]
Prevents this NPC from seeing (or being seen) until it enters a player's viewcone.
Gag : [2]
Won't make IDLE sounds until it's angry.
Fall to ground (unchecked means teleport to ground) : [4]
Drop Healthkit : [8]
Causes this NPC to drop an item_healthvial upon dying.
Efficient : [16]
Don't acquire enemies or avoid obstacles
Wait For Script : [128]
Forces this NPC to "wait" in an idle state until it finishes playing a scripted_sequence.
Long Visibility/Shoot : [256]
By default, increases a NPC's sight range to 6,000 units and allows it to attack from anywhere within that distance.
Fade Corpse : [512]
Think outside PVS : [1024]
Allows this NPC to run its regular AI outside of any player's PVS.
Template NPC : [2048]
Marks this NPC as a template for entities like npc_template_maker. The NPC will not spawn on its own. This is not needed for point_template.
Do Alternate collision for this NPC (player avoidance) : [4096]
Note.pngNote:This flag is disabled in Half-Life 2: Episode One Half-Life 2: Episode Two episodic for player companions, because the StartScripting input does this.
Don't drop weapons : [8192]
Ignore player push : [16384] (in all games since Source 2006)
Entity won't give way to player.

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.


BaseNPC inputs 

CAI_BaseNPC:

ActivateSpeedModifier  !FGD
DisableSpeedModifier  !FGD
Break
Smash into pieces. If this is not possible, disappear.
BecomeRagdoll  (in all games since Half-Life 2: Episode Two)
Remove itself and instantly become a ragdoll with zero force (just go limp). OnDeath, etc. outputs will NOT be fired.
ForceInteractionWithNPC <string> <string>  (in all games since Half-Life 2: Episode One)
Force the NPC to use a dynamic interaction with another NPC. Syntax is <targetname> <dynamic interaction>.
ForgetEntity <targetnameRedirectInput/string>
Clears out the NPC's knowledge of a named entity.
UpdateEnemyMemory  (in all games since Half-Life 2: Episode One)
Update (or create) this NPC's memory of of the given entity.
GagEnable
GagDisable
Gagged NPCs won't speak (or moan, caw, etc.) unless made to be a choreographed scene.
HolsterWeapon  (in all games since Half-Life 2: Episode One)
UnholsterWeapon  (in all games since Half-Life 2: Episode One)
Force the NPC to holster or unholster their weapon. Ignored if the NPC is scripting or if the NPC doesn't use weapons.
HolsterAndDestroyWeapon  (in all games since Half-Life 2: Episode One)
Same as HolsterWeapon, except the weapon is destroyed once it has been concealed.
IgnoreDangerSounds <floatRedirectInput/float>
Ignore danger sounds for the specified number of seconds.
InsideTransition  !FGD
OutsideTransition  !FGD
SetBodyGroup <integerRedirectInput/integer>
HACK: Sets this NPC's body group (from 0–n).
SetEnemyFilter <stringRedirectInput/string>
SetHealth <integerRedirectInput/integer>
Set the NPC's health.
SetMaxLookDistance <floatRedirectInput/float> (only in Garry's Mod)
Sets the maximum look distance for the NPC. Defaults are 2048 and 6000 for long range NPCs.
SetRelationship <string|targetname or classname> <string|disposition> <int|rank>
Changes whether this NPC likes or dislikes certain others. Used like the ai_relationship entity, with this NPC as the subject.
Values for disposition are:
  • D_HT: Hate
  • D_FR: Fear
  • D_LI: Like
  • D_NU: Neutral
SetSquad <stringRedirectInput/string>
Change the name of this NPC's squad. Leaving the parameter blank will remove the NPC from any existing squad.
StartScripting
StopScripting
Enter/exit scripting state, where NPCs ignore a variety of stimulus that would make them break out of their scripts. They ignore danger sounds, ignore +Use, don't idle speak or respond to other NPCs' idle speech, and so on.
Wake
Wakes up the NPC if it is sleeping.

CBaseCombatCharacter:

KilledNPC  !FGD
Tells the entity it killed something. Despite the name, this can include a player. This input will be automatically sent by the victim when they die.
physdamagescale <floatRedirectInput/float>
Scales damage energy when this character is hit by a physics object. With a value of 0 the NPC will take no damage from physics.

DamageFilter:

SetDamageFilter <stringRedirectInput/string>
Sets the entity to use as damage filter. Pass in an empty string (no parameter) to clear the damage filter.

Outputs

BaseNPC Outputs
OnDamaged
Fired when this NPC takes damage (!activator is the damage inflictor).
OnDamagedByPlayer
Fired when this NPC is hurt by a player (!activator is the attacker or vehicle driver [if friendly fire]).
OnDamagedByPlayerSquad
Fired when this NPC is hurt by a player OR by one of the player's squadmates (!activator is the attacker or vehicle driver [if friendly fire]).
OnDeath
Fired when this NPC is killed (!activator is the killer).
OnDenyCommanderUse
Fired when this NPC has refused to join the player's squad.
OnForcedInteractionAborted
Fired when the NPC aborts a forced interaction for some reason (target NPC died, couldn't be pathed to, etc.).
OnForcedInteractionStarted
Fired when the NPC starts a forced interaction.
OnForcedInteractionFinished
"NPCs in actbusies can no longer perform dynamic interactions."
Todo: What does this mean?
OnHalfHealth
Fired when this NPC reaches half of its maximum health.
OnHearCombat
Fired when this NPC hears combat sounds.
OnHearPlayer
Fired when this NPC hears the player.
OnHearWorld
Fired when this NPC hears a sound (other than combat or the player).
OnFoundEnemy <targetname*RedirectOutput/ehandle>
Fired when this NPC establishes line of sight to its enemy.
OnLostEnemy
Fired when this NPC loses its enemy. Usually due to the enemy being killed/removed, or because this NPC has selected a newer, more dangerous enemy.
OnLostEnemyLOS
Fired when this NPC loses line of sight to its enemy.
OnFoundPlayer <targetname*RedirectOutput/ehandle>
Fired when this NPC establishes line of sight to its enemy, and that enemy is a player.
OnLostPlayer
Fired when this NPC loses its enemy, and that enemy was a player. Usually due to the enemy being killed/removed, or because this NPC has selected a newer, more dangerous enemy.
OnLostPlayerLOS
Fired when this NPC loses line of sight to its enemy, and that enemy is a player.
OnSleep
Fired when this NPC enters a sleep state.
OnWake
Fired when this NPC comes out of a sleep state.

Dedicated Console Variables

Cvar/Command Parameters or default value Descriptor Effect
sk_headcrab_health 10Half-Life 2, 15Black Mesa Float A headcrab's spawn health.
sk_headcrab_melee_dmg 5Half-Life 2, 10Black Mesa Float Melee damage. Also used by other headcrab versions.
g_debug_headcrab 0 Bool Toggle headcrab debugging.
sk_headcrab_min_jump_dist (only in Black Mesa (mod) Black Mesa (mod)) 28 Float Minimum jump distance.
sk_headcrab_max_jump_dist (only in Black Mesa (mod) Black Mesa (mod)) 256 Float Maximum jump distance.
sv_headcrab_can_latch_on_player (only in Black Mesa (mod) Black Mesa (mod)) 0 Bool Toggles headcrab's ability to attach player's head (if player catches it with head). Requires this texture to display properly as the texture has been removed.

See also