Difference between revisions of "EVENT TYPE COMBAT INITIATED"

From Dragon Age Toolset Wiki
Jump to: navigation, search
m (sort key)
(formatting)
Line 1: Line 1:
*<b>Sent When:</b> Fires whenever the attack command is added into the command queue. Used to set combat mode and combat camera/music. Also fires by scripting to trigger combat after being attacked or an ally is attack.
+
{{event
*<b>Sent From:</b> Engine
+
|when=Fires whenever the attack command is added into the command queue. Used to set combat mode and combat camera/music. Also fires by scripting to trigger combat after being attacked or an ally is attack.
*<b>Sent To:</b> creatures, players.
+
|from=[[Engine]]
 
+
|to=[[creature]]s, players
Parameters:
+
|creatorname= oAttacker
*<b>Creator:</b> attacking creature
+
|creatordesc= attacking creature
*<b>Object 0:</b> target creature
+
|object0name= oTarget
 +
|object0desc= target creature
 +
}}
  
 
[[Category:Event types|COMBAT_INITIATED]]
 
[[Category:Event types|COMBAT_INITIATED]]

Revision as of 17:26, 24 July 2009

Source:
[Undocumented]
Sent when:
Fires whenever the attack command is added into the command queue. Used to set combat mode and combat camera/music. Also fires by scripting to trigger combat after being attacked or an ally is attack.
Sent from:
Engine
Sent to:
creatures, players
Parameters:
  • Creator: attacking creature
  • Object 0: target creature

Usage

case EVENT_TYPE_COMBAT_INITIATED:
{
object oAttacker = GetEventCreator(ev); // attacking creature
object oTarget = GetEventObject(ev, 0); // target creature

// insert event-handling code here

break;
}