EVENT TYPE ATTACK IMPACT
From Dragon Age Toolset Wiki
Revision as of 23:19, 1 May 2011 by Noob766 (Talk | contribs) (A couple of the integers aren't acurate.)
- 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: Effect ID
- Object 0: attacker
- Object 1: target
- Location 0: position
- Location 1: orientation
effect eImpactEffect = GetAttackImpactDamageEffect(oAttacker,nEffectId); object oWeapon = GetEffectObject(eImpactEffect,0); int nApp = GetAppearanceType(oAttacker); int nAbility = GetEffectInteger(eImpactEffect,1); float fDamage = GetEffectFloat(eImpactEffect,0); int nVfx = GetEffectInteger(eImpactEffect,0); int nDamageType = GetEffectInteger(eImpactEffect, 2);
Usage
case EVENT_TYPE_ATTACK_IMPACT:
{
int nHitResult = GetEventInteger(ev, 0); // hit result (hit, miss, critical etc')
int nEffectId = GetEventInteger(ev, 1); // Effect ID
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;
}
{
int nHitResult = GetEventInteger(ev, 0); // hit result (hit, miss, critical etc')
int nEffectId = GetEventInteger(ev, 1); // Effect ID
object oAttacker = GetEventObject(ev, 0); // attacker
object oTarget = GetEventObject(ev, 1); // target
location lImpact = GetEventLocation(ev, 0); // position
location lMissile = GetEventLocation(ev, 1); // orientation
effect eImpactEffect = GetAttackImpactDamageEffect(oAttacker,nEffectId); object oWeapon = GetEffectObject(eImpactEffect,0); int nApp = GetAppearanceType(oAttacker); int nAbility = GetEffectInteger(eImpactEffect,1); float fDamage = GetEffectFloat(eImpactEffect,0); int nVfx = GetEffectInteger(eImpactEffect,0); int nDamageType = GetEffectInteger(eImpactEffect, 2);
// 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').