Npc destroy: Difference between revisions
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		 Note:The game must be in Developer mode for this command to work properly.
Note:The game must be in Developer mode for this command to work properly.
		
	
| m (Replacing {{console command}}. This operation was performed by a bot.) | Gameplayer (talk | contribs)  No edit summary | ||
| Line 3: | Line 3: | ||
| This command flags the NPC with a note to destroy itself, so if AI is not running (due to the [[ai_disable]] command), the command will be ignored. | This command flags the NPC with a note to destroy itself, so if AI is not running (due to the [[ai_disable]] command), the command will be ignored. | ||
| {{devreq}} | |||
| ==Usage== | ==Usage== | ||
| * <code>npc_destroy</code> | * <code>npc_destroy</code> | ||
Revision as of 01:08, 28 August 2024
npc_destroy  is a   console command  available in all  Source games.
The
 Source games.
The npc_destroy console command is a debugging tool that destroys NPCs. Destroyed NPCs are silently removed, so outputs such as "OnDamaged" and "OnDeath" are not fired, nor are ragdolls created. Destroyed NPCs carrying weapons will drop the weapon before removing themselves.
This command flags the NPC with a note to destroy itself, so if AI is not running (due to the ai_disable command), the command will be ignored.
 Note:The game must be in Developer mode for this command to work properly.
Note:The game must be in Developer mode for this command to work properly.Usage
- npc_destroy- This will destroy the NPC under your crosshair, if any.
 
- npc_destroy <entity index>- This will destroy the NPC matching the specified entity index, if any.
 
- npc_destroy <name>- This will destroy all NPCs whose classname or targetname matches the specified name.
 
