Difference between revisions of "EVENT TYPE COMBAT INITIATED"

From Dragon Age Toolset Wiki
Jump to: navigation, search
m (sort key)
m (remove redundant category)
 
(4 intermediate revisions by 2 users not shown)
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
+
|sourcefile=script.ldf
*<b>Sent To:</b> creatures, players.
+
|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.
 
+
|from=[[Engine]]
Parameters:
+
|to=[[creature]]s, players
*<b>Creator:</b> attacking creature
+
|tocategory1=creature
*<b>Object 0:</b> target creature
+
|sortkey=COMBAT_INITIATED
 
+
|creatorname= oAttacker
[[Category:Event types|COMBAT_INITIATED]]
+
|creatordesc= attacking creature
 +
|object0name= oTarget
 +
|object0desc= target creature
 +
}}

Latest revision as of 00:55, 12 February 2010

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