Npc create: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(npc_create is explained here)
 
(Updated to match the rest of the AI debugging pages.)
Line 1: Line 1:
With npc_select you can create existing NPCs in game.
{{wrongtitle|title=npc_create}}
That means if you want to create an Combine Metropolice Soldier in game, you have to open console
and execute:
<pre>
npc_create NPC_NAME
</pre>


for example
The <code>npc_create</code> console command is a debugging tool that allows you to create NPCs on the fly. It creates the NPC in the world at the position you are looking at. The classname specified must be a valid classname from the NPC section in the [[List Of Entities]].
<pre>
npc_create npc_metropolice
</pre>
A Metropolice-Soldier will be created where you crosshair is aiming at.


----
It's important to realise that NPCs created using this command are dropped into the world without all their data set to defaults. In essence, they act as they would if they were placed by a level designer who didn't set any of their KeyValue fields in Hammer. As a result, not all NPCs will be able to function properly when created via this command. For example, all [[track pathing]] NPCs (like Striders & Gunships) won't find a track to path on. As a result, <code>npc_create</code> is '''not''' a command to use to test AI quality in an area. Instead, it's a great tool for testing things other than the NPCs you're creating.


Here is a list of NPC names
 
    * npc_barney
 
    * npc_gman
==Usage==
    * npc_mossman
* <code>npc_create <classname></code>
    * npc_breen
** Create the NPC matching <classname> at the point you're looking at, if it can fit in the space.
    * npc_alyx
 
    * npc_eli
 
    * npc_dog
 
    * npc_crow
==See also==
    * npc_seagull
 
    * npc_manhack
*[[ai_disable]]
    * npc_csscanner
*[[npc_create_equipment]], [[npc_create_aimed]]
    * npc_vortigaunt
 
    * npc_citizen
 
    * npc_monk
[[Category:Debugging]]
    * npc_zombie
[[Category:AI Commands]]
    * npc_fastzombie
[[Category:AI]]
    * npc_poisonzombie
    * npc_headcrab
    * npc_headcrab_black
    * npc_barnacle
    * npc_antlion
    * npc_strider
    * npc_helicopter
    * npc_metropolice
    * npc_combine_s
    * npc_combinegunship

Revision as of 13:23, 12 July 2005

Template:Wrongtitle

The npc_create console command is a debugging tool that allows you to create NPCs on the fly. It creates the NPC in the world at the position you are looking at. The classname specified must be a valid classname from the NPC section in the List Of Entities.

It's important to realise that NPCs created using this command are dropped into the world without all their data set to defaults. In essence, they act as they would if they were placed by a level designer who didn't set any of their KeyValue fields in Hammer. As a result, not all NPCs will be able to function properly when created via this command. For example, all track pathing NPCs (like Striders & Gunships) won't find a track to path on. As a result, npc_create is not a command to use to test AI quality in an area. Instead, it's a great tool for testing things other than the NPCs you're creating.


Usage

  • npc_create <classname>
    • Create the NPC matching <classname> at the point you're looking at, if it can fit in the space.


See also