Difference between revisions of "EVENT TYPE COMMAND COMPLETE"

From Dragon Age Toolset Wiki
Jump to: navigation, search
m (|sourcefile=script.ldf)
(update template)
Line 4: Line 4:
 
|from= [[Engine]]
 
|from= [[Engine]]
 
|to= [[creature]]s, player
 
|to= [[creature]]s, player
 +
|tocategory1=creature
 +
|sortkey=COMMAND_COMPLETE
 
|creatorname=oActor
 
|creatorname=oActor
 
|creatordesc= creature acting
 
|creatordesc= creature acting
Line 15: Line 17:
 
|object0desc= The target that command was applied to
 
|object0desc= The target that command was applied to
 
}}
 
}}
 
[[Category:Event types|COMMAND_COMPLETE]]
 

Revision as of 16:45, 6 August 2009

Source:
script.ldf
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;
}