Npc destroy unselected: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
{{ | {{Console Command|AI Commands}} | ||
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. | ||
Line 16: | Line 15: | ||
[[Category:Debugging]] | [[Category:Debugging]] | ||
Revision as of 13:13, 28 June 2023
Template:Console Command
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.
Usage
npc_destroy_unselected
- This will destroy all selected NPCs.