Npc kill

From Valve Developer Community
Revision as of 23:58, 8 July 2005 by Robin Walker (talk | contribs) (Created.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Template:Wrongtitle

The npc_kill console command is a debugging tool that kills NPCs. The command kills NPCs by dealing enough damage to kill them, so the "OnDamaged" and "OnDeath" outputs will be fired.

This command flags the NPC with a note to kill itself, so if AI is not running (due to the ai_disable command), the command will be ignored.

Usage

  • npc_kill
    • This will kill the NPC under your crosshair, if any.
  • npc_kill <entity index>
    • This will kill the NPC matching the specified entity index, if any.
  • npc_kill <name>
    • This will kill all NPCs who's classname matches the specified name, or who's targetname matches the specified name.


See also