Difference between revisions of "EVENT TYPE ABILITY CAST START"
From Dragon Age Toolset Wiki
BryanDerksen (Talk | contribs) m |
m (Updating template) |
||
Line 1: | Line 1: | ||
{{event | {{event | ||
− | |sourcefile=script.ldf | + | |sourcefile = script.ldf |
− | |when=whenever any ability (spell, talent) is used | + | |sourcemodule = |
− | |to={{undocumented}} | + | |sortkey = ABILITY_CAST_START |
− | |from=engine | + | |when = whenever any ability (spell, talent) is used |
− | |object0name=oCaster | + | |to = {{undocumented}} |
− | |object0desc=The spell's caster | + | |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) |
− | |int0name=nAbilityId | + | |object2name = oTarget |
− | |int1name=nResistanceCheckResult | + | |object2desc = the object that the ability was targeted |
− | |int2name=nImpactCounter | + | |int0name = nAbilityId |
+ | |int0desc = {{undocumented}} | ||
+ | |int1name = nResistanceCheckResult | ||
+ | |int1desc = {{undocumented}} | ||
+ | |int2name = nImpactCounter | ||
+ | |int2desc = {{undocumented}} | ||
}} | }} | ||
+ | |||
+ | == Remarks == | ||
* Update mana/stamina | * Update mana/stamina | ||
Line 19: | 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 [[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. |
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;
}
{
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.