Difference between revisions of "EVENT TYPE COMBAT INITIATED"

From Dragon Age Toolset Wiki
Jump to: navigation, search
(formatting)
m (|sourcefile=script.ldf)
Line 1: Line 1:
 
{{event
 
{{event
 +
|sourcefile=script.ldf
 
|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.
 
|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]]
 
|from=[[Engine]]

Revision as of 20:38, 30 July 2009

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;
}