Creating a task: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (more general)
(Redirected page to Task)
 
(12 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{npc tut}}
#redirect [[Task]]
==Declaration==
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:
<pre> DECLARE_TASK( TASK_NEWNPC_TASK )</pre>
{{note|It is not necessary to declare tasks inherited from the BaseClass}}
==Implementation==
{{todo|Implementation}}
{{navbar|Defining the NPC|Creating an NPC|Creating an activity}}

Latest revision as of 03:02, 16 September 2011

Redirect to: