Difference between revisions of "EVENT TYPE ABILITY CAST START"

From Dragon Age Toolset Wiki
Jump to: navigation, search
(|sourcefile=script.ldf)
m (Updating template)
 
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
 
{{event
 
{{event
|sourcefile=script.ldf
+
|sourcefile   = script.ldf
|when=whenever any ability (spell, talent) is used
+
|sourcemodule =
|to=
+
|sortkey      = ABILITY_CAST_START
|from=engine
+
|when         = whenever any ability (spell, talent) is used
|object0name=
+
|to           = {{undocumented}}
|object0desc=
+
|from         = engine
|object1name=oItem
+
|object0name = oCaster
|object1desc=the item used to cast the ability (optional)
+
|object0desc = The spell's caster
|object2name=oTarget
+
|object1name = oItem
|object2desc=the object that the ability was targeted
+
|object1desc = the item used to cast the ability (optional)
 +
|object2name = oTarget
 +
|object2desc = the object that the ability was targeted
 +
|int0name    = nAbilityId
 +
|int0desc    = {{undocumented}}
 +
|int1name    = nResistanceCheckResult
 +
|int1desc    = {{undocumented}}
 +
|int2name    = nImpactCounter
 +
|int2desc    = {{undocumented}}
 
}}
 
}}
 +
 +
== Remarks ==
  
 
* Update mana/stamina
 
* Update mana/stamina
Line 16: Line 26:
 
* Calculate resistance check/failure for non-AOE abilities (if valid)
 
* Calculate resistance check/failure for non-AOE abilities (if valid)
 
* Calculate *combat* damage (only for hit based talents like Deadly Strike)
 
* 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 CAST_IMPACT event back to this script (see below)
 
  
note: 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.
+
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).
  
[[Category:Event types|ABILITY_CAST_START]]
+
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.

Latest revision as of 18:56, 21 August 2011

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.