Creating a condition: Difference between revisions
Jump to navigation
Jump to search
Note:It is not necessary to declare shared conditions.
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
{{npc tut}} | {{npc tut}} | ||
==Declaration== | |||
The first step to creating a condition for your NPC is to create a name for it and add it to the enum. Here's an example name for a condition: '''COND_BLOCKED_BY_DOOR'''. | The first step to creating a condition for your NPC is to create a name for it and add it to the enum. Here's an example name for a condition: '''COND_BLOCKED_BY_DOOR'''. | ||
Line 7: | Line 8: | ||
<pre> DECLARE_CONDITION( COND_NEWNPC_CONDITION )</pre> | <pre> DECLARE_CONDITION( COND_NEWNPC_CONDITION )</pre> | ||
{{note|It is not necessary to declare shared conditions.}} | {{note|It is not necessary to declare shared conditions.}} | ||
==Implementation== | |||
{{todo|Implementation}} | |||
{{navbar|Creating an activity|Creating an NPC|Creating an animevent}} | {{navbar|Creating an activity|Creating an NPC|Creating an animevent}} |
Revision as of 13:33, 8 June 2006
Declaration
The first step to creating a condition for your NPC is to create a name for it and add it to the enum. Here's an example name for a condition: COND_BLOCKED_BY_DOOR.
Once the condition is added to the enum, you must use the DECLARE_CONDITION macro in the AI_BEGIN_CUSTOM_NPC section.
Here's an example of the DECLARE_CONDITION code:
DECLARE_CONDITION( COND_NEWNPC_CONDITION )

Implementation
Todo: Implementation