Npc select: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Replacing {{console command}}. This operation was performed by a bot.)
(Undo revision 371948 by PeeBot (talk))
Tag: Undo
Line 1: Line 1:
{{this is a|console command}}
{{Console command|AI commands}}


The <code>npc_select</code> command is a debugging tool that allows you to select an NPC, or group of NPCs, for a variety of purposes.  
The <code>npc_select</code> command is a debugging tool that allows you to select an NPC, or group of NPCs, for a variety of purposes.  

Revision as of 17:41, 7 January 2024

Template:Console command

The npc_select command is a debugging tool that allows you to select an NPC, or group of NPCs, for a variety of purposes.


Usage

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


Many debugging systems display debug for currently selected NPCs only. Common uses of selected NPCs via console commands are:

  • npc_go
    • Tell all selected NPCs to move to the position you are currently looking at.
  • npc_destroy_unselected
    • Remove all NPCs that aren't currently selected.


See also

General AI

Navigation

Node debugging