Difference between revisions of "EVENT TYPE COMMAND COMPLETE"

From Dragon Age Toolset Wiki
Jump to: navigation, search
m (sort key)
(formatting)
Line 1: Line 1:
*<b>Sent When:</b> creature finishes doing a command(attack, special ability, spell, conversation, etc)
+
{{event
*<b>Sent From:</b> engine
+
|when= creature finishes doing a command(attack, special ability, spell, conversation, etc)
*<b>Sent To:</b> creatures, player
+
|from= [[Engine]]
 
+
|to= [[creature]]s, player
Parameters:
+
|creatorname=oActor
*<b>Creator:</b> creature acting
+
|creatordesc= creature acting
*<b>Int 0</b> Type of the last command (e.g. COMMAND_TYPE_ATTACKED)
+
|int0name= nLastCommand
*<b>Int 1</b> The status of the execution (COMMAND_SUCCESSFUL, etc)
+
|int0desc= Type of the last command (e.g. COMMAND_TYPE_ATTACKED)
*<b>Int 2</b> last sub command
+
|int1name= nStatus
*<b>obj(0)</b> The target that command was applied to
+
|int1desc= The status of the execution (COMMAND_SUCCESSFUL, etc)
 +
|int2name= nLastSubCommand
 +
|int2desc= last sub command
 +
|object0name = oTarget
 +
|object0desc= The target that command was applied to
 +
}}
  
 
[[Category:Event types|COMMAND_COMPLETE]]
 
[[Category:Event types|COMMAND_COMPLETE]]

Revision as of 17:28, 24 July 2009

Source:
[Undocumented]
Sent when:
creature finishes doing a command(attack, special ability, spell, conversation, etc)
Sent from:
Engine
Sent to:
creatures, player
Parameters:
  • Creator: creature acting
  • Integer 0: Type of the last command (e.g. COMMAND_TYPE_ATTACKED)
  • Integer 1: The status of the execution (COMMAND_SUCCESSFUL, etc)
  • Integer 2: last sub command
  • Object 0: The target that command was applied to

Usage

case EVENT_TYPE_COMMAND_COMPLETE:
{
object oActor = GetEventCreator(ev); // creature acting
int nLastCommand = GetEventInteger(ev, 0); // Type of the last command (e.g. COMMAND_TYPE_ATTACKED)
int nStatus = GetEventInteger(ev, 1); // The status of the execution (COMMAND_SUCCESSFUL, etc)
int nLastSubCommand = GetEventInteger(ev, 2); // last sub command
object oTarget = GetEventObject(ev, 0); // The target that command was applied to

// insert event-handling code here

break;
}