Creating a schedule: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
 
(Redirected page to Schedule)
 
(16 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{npc tut}}
#redirect [[schedule]]
The first step to creating a schedule for your NPC is to create a name for it and add it to the enum. Here's an example name for a schedule: '''SCHED_COMBINE_GRENADE_COVER1'''.
 
Once the schedule is added to the enum, you must use the '''DEFINE_SCHEDULE''' macro in the '''AI_BEGIN_CUSTOM_NPC''' section.
 
Here's an example of the schedule code:
<pre> DEFINE_SCHEDULE
(
SCHED_NEWNPC_SCHEDULE,
 
" Tasks"
" TASK_STOP_MOVING 0"
" TASK_FACE_ENEMY 0"
" TASK_ANNOUNCE_ATTACK 1"
" TASK_WAIT 1"
" TASK_RANGE_ATTACK1 0"
" TASK_CIT_RPG_AUGER 1"
""
" Interrupts"
" COND_ENEMY_DEAD"
" COND_LIGHT_DAMAGE"
" COND_HEAVY_DAMAGE"
" COND_HEAR_DANGER"
" COND_NEW_ENEMY"
)</pre>
 
See [[Task list]] and [[Condition list]] for more capabilities in a schedule.
 
{{navbar-last|Creating an interaction|Creating an NPC}}

Latest revision as of 03:03, 16 September 2011

Redirect to: