Npc select: 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.
		
	
| Gameplayer (talk | contribs) No edit summary | Gameplayer (talk | contribs)  No edit summary | ||
| Line 6: | Line 6: | ||
| ==Usage== | ==Usage== | ||
| *  | * {{code|npc_select}} | ||
| ** This will toggle selection of the NPC under your crosshair, if any. | ** This will toggle selection of the NPC under your crosshair, if any. | ||
| *  | * {{code|npc_select <entity index>}} | ||
| ** This will toggle selection of the NPC matching the specified entity index, if any. | ** This will toggle selection of the NPC matching the specified entity index, if any. | ||
| *  | * {{code|npc_select <name>}} | ||
| ** This will toggle selection of all NPCs who's classname matches the specified name, or whose targetname matches the specified name. | ** This will toggle selection of all NPCs who's classname matches the specified name, or whose targetname matches the specified name. | ||
| * {{code|npc_select *}} | |||
| ** This will select all NPCs in the current map. | |||
Revision as of 03:09, 29 August 2024
npc_select  is a   console command  available in all  Source games.
 Source games.
The npc_select command is a debugging tool that allows you to select an NPC, or group of NPCs, for a variety of purposes. 
 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_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.
 
- npc_select *- This will select all NPCs in the current map.
 
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
- ai_disable
- ent_text
- npc_go, npc_task_text, npc_destroy, npc_destroy_unselected, npc_kill, npc_enemies, npc_focus, npc_freeze, npc_squads, npc_viewcone
- npc_create, npc_create_equipment, npc_create_aimed
Navigation
Node debugging
