Npc create

From Valve Developer Community
Revision as of 13:23, 12 July 2005 by Robin Walker (talk | contribs) (Updated to match the rest of the AI debugging pages.)
Jump to navigation Jump to search

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