Difference between revisions of "EVENT TYPE COMMAND COMPLETE"
From Dragon Age Toolset Wiki
BryanDerksen (Talk | contribs) (formatting) |
BryanDerksen (Talk | contribs) m (|sourcefile=script.ldf) |
||
Line 1: | Line 1: | ||
{{event | {{event | ||
+ | |sourcefile=script.ldf | ||
|when= creature finishes doing a command(attack, special ability, spell, conversation, etc) | |when= creature finishes doing a command(attack, special ability, spell, conversation, etc) | ||
|from= [[Engine]] | |from= [[Engine]] |
Revision as of 20:39, 30 July 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;
}
{
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;
}