EVENT TYPE ABILITY CAST IMPACT
From Dragon Age Toolset Wiki
Revision as of 19:45, 20 August 2009 by BryanDerksen (Talk | contribs) (add information from CProjectile.cpp)
- Source:
- script.ldf
- Sent when:
- Fires for the moment of impact for every ability. This is where damage should be applied, fireballs explode, enemies get poisoned etc. We assume that stamina/mana have been deducted when the ability was triggered (COMMAND_PENDING stage)
- Sent from:
- engine
- Sent to:
- [Undocumented]
- Parameters:
-
- Integer 0: [Undocumented]
- Integer 1: [Undocumented]
- Object 0: [Undocumented]
- Object 1: the item used to cast the ability (optional - set to INVALID_OBJECT_ID otherwise)
- Object 2: the object that the ability was targeted
- Location 0: [Undocumented]
- Location 1: [Undocumented]
Usage
case EVENT_TYPE_ABILITY_CAST_IMPACT:
{
int nAbilityId = GetEventInteger(ev, 0); //
int nResitanceCheckResult = GetEventInteger(ev, 1); //
object oEventObjectId = GetEventObject(ev, 0); //
object oItem = GetEventObject(ev, 1); // the item used to cast the ability (optional - set to INVALID_OBJECT_ID otherwise)
object oTarget = GetEventObject(ev, 2); // the object that the ability was targeted>
location lPosition = GetEventLocation(ev, 0); //
location lAnimBaseOrientation = GetEventLocation(ev, 1); //
// insert event-handling code here
break;
}
{
int nAbilityId = GetEventInteger(ev, 0); //
int nResitanceCheckResult = GetEventInteger(ev, 1); //
object oEventObjectId = GetEventObject(ev, 0); //
object oItem = GetEventObject(ev, 1); // the item used to cast the ability (optional - set to INVALID_OBJECT_ID otherwise)
object oTarget = GetEventObject(ev, 2); // the object that the ability was targeted>
location lPosition = GetEventLocation(ev, 0); //
location lAnimBaseOrientation = GetEventLocation(ev, 1); //
// insert event-handling code here
break;
}
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.