EVENT TYPE ABILITY CAST START

From Dragon Age Toolset Wiki
Jump to: navigation, search
Source:
script.ldf
Sent when:
whenever any ability (spell, talent) is used
Sent from:
engine
Sent to:
[Undocumented]
Parameters:
  • Integer 0: [Undocumented]
  • Integer 1: [Undocumented]
  • Integer 2: [Undocumented]
  • Object 0: The spell's caster
  • Object 1: the item used to cast the ability (optional)
  • Object 2: the object that the ability was targeted

Usage

case EVENT_TYPE_ABILITY_CAST_START:
{
int nAbilityId = GetEventInteger(ev, 0); // [Undocumented]
int nResistanceCheckResult = GetEventInteger(ev, 1); // [Undocumented]
int nImpactCounter = GetEventInteger(ev, 2); // [Undocumented]
object oCaster = GetEventObject(ev, 0); // The spell's caster
object oItem = GetEventObject(ev, 1); // the item used to cast the ability (optional)
object oTarget = GetEventObject(ev, 2); // the object that the ability was targeted>

// insert event-handling code here

break;
}

Remarks

  • Update mana/stamina
  • Calculate *combat* attack/miss (only for hit based talents like Deadly Strike)
  • Calculate resistance check/failure for non-AOE abilities (if valid)
  • Calculate *combat* damage (only for hit based talents like Deadly Strike)

Most of the above information is then passed on to the engine who need to decide what animations to play (or not to play). The engine then returns most of this information along with the EVENT_TYPE_ABILITY_CAST_IMPACT event back to this script (see below).

In case of a projectile impact, there might be more than one target (object 2+...) this allows doing things like lightning bolts going through targets, but this is not currently made use of in Dragon Age.