This article's documentation is for anything that uses the Source engine. Click here for more information.

Npc destroy unselected: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Created.)
 
(Undo revision 453619 by Gameplayer (talk))
Tag: Undo
 
(8 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{{wrongtitle|title=npc_destroy_unselected}}
{{this is a|console command|name=npc_destroy_unselected}}
 
The <code>npc_destroy_unselected</code> console command is a debugging tool that destroys all unselected NPCs. To select NPCs, use the [[npc_select]] command. 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.
The <code>npc_destroy_unselected</code> console command is a debugging tool that destroys all unselected NPCs. To select NPCs, use the [[npc_select]] command. 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 NPCs with a note to destroy themselves, so if AI is not running (due to the [[ai_disable]] command), the command will be ignored.
 
{{devreq}}
==Usage==
==Usage==
* <code>npc_destroy_unselected</code>
* <code>npc_destroy_unselected</code>
Line 12: Line 11:
==See also==
==See also==


*[[npc_select]], [[npc_destroy]]
*[[npc_select]], [[npc_destroy]], [[npc_kill]]




[[Category:Debugging]]
[[Category:Debugging]]
[[Category:AI Commands]]
[[Category:AI]]

Latest revision as of 09:15, 17 September 2024

npc_destroy_unselected is a console command available in all Source Source games. The npc_destroy_unselected console command is a debugging tool that destroys all unselected NPCs. To select NPCs, use the npc_select command. 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 NPCs with a note to destroy themselves, so if AI is not running (due to the ai_disable command), the command will be ignored.

Note.pngNote:The game must be in Developer mode for this command to work properly.

Usage

  • npc_destroy_unselected
    • This will destroy all selected NPCs.


See also