Creating a task

From Valve Developer Community
Revision as of 19:48, 8 June 2006 by Ts2do (talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The first step to creating a task for your NPC is to create a name for it and add it to the enum. Here's an example name for a task: TASK_COMBINE_DIE_INSTANTLY.

Once the task is added to the enum, you must use the DECLARE_TASK macro in the AI_BEGIN_CUSTOM_NPC section.

Here's an example of the DECLARE_TASK code:

Note:It is not necessary to declare tasks inherited from the BaseClass

Creating an NPC
Defining the NPC
Creating an activity