Defining the NPC: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 2: Line 2:
To start your NPC, you must create a definition for it first.
To start your NPC, you must create a definition for it first.


Copy the file <code>src\dlls\hl2_dll\monster_dummy.cpp</code> to a file related to the classname.
Copy [[npc_New.cpp]] to a new file related to the classname.


Example: <code>src\dlls\hl2_dll\npc_Barney.cpp</code>
Example: <code>src\dlls\hl2_dll\npc_Barney.cpp</code>
Once you have created the new file, you should remove the enums at the top as well as the references to them in <code>InitCustomSchedules</code>.
[[Category:AI Programming]]
[[Category:AI Programming]]

Revision as of 12:15, 8 June 2006

To start your NPC, you must create a definition for it first.

Copy npc_New.cpp to a new file related to the classname.

Example: src\dlls\hl2_dll\npc_Barney.cpp