Difference between revisions of "EVENT TYPE ABILITY CAST IMPACT"

From Dragon Age Toolset Wiki
Jump to: navigation, search
(add information from CProjectile.cpp)
m (Updating template)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
{{event
 
{{event
|sourcefile=script.ldf
+
|sourcefile   = script.ldf
|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)  
+
|sourcemodule  =
|to={{undocumented}}
+
|sortkey      = ABILITY_CAST_IMPACT
|from=engine
+
|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). For melee talents, this event fires if the associated animations has an "Ability cast impact" event assigned to it (see [[Animation blend tree editor#Event editor]]).
|object0name=oEventObjectId
+
|to           = ability_core
|object0desc=
+
|from         = engine
|object1name=oItem
+
|object0name   = oEventObjectId
|object1desc=the item used to cast the ability (optional - set to INVALID_OBJECT_ID otherwise)
+
|object0desc   =
|object2name=oTarget
+
|object1name   = oItem
|object2desc=the object that the ability was targeted
+
|object1desc   = (optional) the item used to cast the ability or [[OBJECT_INVALID keyword|OBJECT_INVALID]]
|int0name=nAbilityId
+
|object2name   = oTarget
|int0desc=
+
|object2desc   = the object that the ability was targeted
|int1name=nResitanceCheckResult
+
|int0name     = nAbilityId
|int1desc=
+
|int0desc     =
|location0name=lPosition
+
|int1name     = nResitanceCheckResult
|location0desc=
+
|int1desc     =
|location1name=lAnimBaseOrientation
+
|location0name = lPosition
|location1desc=
+
|location0desc =
 +
|location1name =lAnimBaseOrientation
 +
|location1desc =
 
}}
 
}}
 
+
== Remarks ==
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.
+
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.
 
+
[[Category:Event types|ABILITY_CAST_IMPACT]]
+

Latest revision as of 18:55, 21 August 2011

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). For melee talents, this event fires if the associated animations has an "Ability cast impact" event assigned to it (see Animation blend tree editor#Event editor).
Sent from:
engine
Sent to:
ability_core
Parameters:

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); // (optional) the item used to cast the ability or OBJECT_INVALID
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;
}

Remarks

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.