Difference between revisions of "EVENT TYPE ABILITY CAST START"
From Dragon Age Toolset Wiki
BryanDerksen (Talk | contribs) (link) |
BryanDerksen (Talk | contribs) m |
||
Line 2: | Line 2: | ||
|sourcefile=script.ldf | |sourcefile=script.ldf | ||
|when=whenever any ability (spell, talent) is used | |when=whenever any ability (spell, talent) is used | ||
− | |to= | + | |to={{undocumented}} |
|from=engine | |from=engine | ||
|object0name=oCaster | |object0name=oCaster |
Revision as of 22:23, 11 February 2010
- 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); //
int nResistanceCheckResult = GetEventInteger(ev, 1); //
int nImpactCounter = GetEventInteger(ev, 2); //
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;
}
{
int nAbilityId = GetEventInteger(ev, 0); //
int nResistanceCheckResult = GetEventInteger(ev, 1); //
int nImpactCounter = GetEventInteger(ev, 2); //
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;
}
- 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)
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.