Creating a schedule: Difference between revisions
Jump to navigation
Jump to search
m (shared) |
m (referred to file rather than bulking up the wiki) |
||
Line 24: | Line 24: | ||
" COND_NEW_ENEMY" | " COND_NEW_ENEMY" | ||
)</pre> | )</pre> | ||
It is also possible to use custom tasks and conditions here. | |||
See | See <code>sharedtasks_e</code> in <code>src\dlls\AI_Task.h</code> for shared tasks allowed in a schedule. | ||
See <code>SCOND_t</code> in <code>src\dlls\AI_Condition.h</code> for shared interruptions allowed in a schedule. | |||
{{navbar-last|Creating an interaction|Creating an NPC}} | {{navbar-last|Creating an interaction|Creating an NPC}} |
Revision as of 12:28, 8 June 2006
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:
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" )
It is also possible to use custom tasks and conditions here.
See sharedtasks_e
in src\dlls\AI_Task.h
for shared tasks allowed in a schedule.
See SCOND_t
in src\dlls\AI_Condition.h
for shared interruptions allowed in a schedule.
← Creating an interaction | Return to Creating an NPC |