Difference between revisions of "EVENT TYPE ATTACK IMPACT"

From Dragon Age Toolset Wiki
Jump to: navigation, search
(update template)
Line 26: Line 26:
  
 
[[Category:Event types|ATTACK_IMPACT]]
 
[[Category:Event types|ATTACK_IMPACT]]
 +
[[Category:Creature events|ATTACK_IMPACT]]

Revision as of 05:32, 3 January 2010

Source:
script.ldf
Sent when:
Exact moment of impact
Sent from:
Engine
Sent to:
Attacking creature or player
Parameters:
  • Creator: attacker
  • Integer 0: hit result (hit, miss, critical etc')
  • Integer 1: damage
  • Integer 2: [Undocumented]
  • Object 0: attacker
  • Object 1: target
  • Location 0: position
  • Location 1: orientation

Usage

case EVENT_TYPE_ATTACK_IMPACT:
{
int nResult = GetEventInteger(ev, 0); // hit result (hit, miss, critical etc')
int nDamage = GetEventInteger(ev, 1); // damage
int nProjectileType = GetEventInteger(ev, 2); //
object oAttacker = GetEventObject(ev, 0); // attacker
object oTarget = GetEventObject(ev, 1); // target
location lImpact = GetEventLocation(ev, 0); // position
location lMissile = GetEventLocation(ev, 1); // orientation

// insert event-handling code here

break;
}

An attack has impacted the target. This can be melee (sword hit), ranged (arrow hit) or spell (fireball explodes). Used for applying damage, and handling abilities that function on hit (Berserk etc').