Difference between revisions of "EVENT TYPE HANDLE CUSTOM AI"

From Dragon Age Toolset Wiki
Jump to: navigation, search
m
m (remove redundant category)
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
{{event
 
{{event
 +
|sourcefile=events_h
 
|when=This event is sent to creature scripts after [[custom AI]] has been enabled (call [[CAI_SetCustomAI]](OBJECT_SELF, CAI_INITIATE) in the [[EVENT_TYPE_SPAWN]] event).
 
|when=This event is sent to creature scripts after [[custom AI]] has been enabled (call [[CAI_SetCustomAI]](OBJECT_SELF, CAI_INITIATE) in the [[EVENT_TYPE_SPAWN]] event).
 
|from=
 
|from=
 
|to=[[creature]]s
 
|to=[[creature]]s
 +
|tocategory1=creature
 +
|sortkey=HANDLE_CUSTOM_AI
 +
|object0name=oLastTarget
 +
|int1name=nLastCommand
 +
|int2name=nLastCommandStatus
 +
|int3name=nLastSubCommand
 +
|int4name=nAITargetType
 +
|int5name=nAIParameter
 +
|int6name=nTacticID
 
}}
 
}}
 
[[Category:Event types|HANDLE_CUSTOM_AI]]
 

Latest revision as of 01:13, 12 February 2010

Source:
events_h
Sent when:
This event is sent to creature scripts after custom AI has been enabled (call CAI_SetCustomAI(OBJECT_SELF, CAI_INITIATE) in the EVENT_TYPE_SPAWN event).
Sent from:
Sent to:
creatures
Parameters:

Usage

case EVENT_TYPE_HANDLE_CUSTOM_AI:
{
int nLastCommand = GetEventInteger(ev, 1); //
int nLastCommandStatus = GetEventInteger(ev, 2); //
int nLastSubCommand = GetEventInteger(ev, 3); //
int nAITargetType = GetEventInteger(ev, 4); //
int nAIParameter = GetEventInteger(ev, 5); //
int nTacticID = GetEventInteger(ev, 6); //
object oLastTarget = GetEventObject(ev, 0); //

// insert event-handling code here

break;
}