Ability UseAbilityWrapper

From Dragon Age Toolset Wiki
Jump to: navigation, search

Simple wrapper to use a modal ability on a creature

void Ability_UseAbilityWrapper(
object oCreature,
int nAbility,
object oTarget,
int bAddIfNeeded = FALSE,
int bAddCommandToTop = TRUE
);
Parameters:
oCreature
Creature using the ability
nAbility
ABILITY* to use
oTarget
The ability target (should be same as oCreature for modal talents
bAddIfNeeded
Add the talent to the creature if it doesn't have it
bAddCommandToTop
Whether or not to add the use ability command at the top or bottom of the action queue
Returns:

Nothing.

Source:

Core Resources.ability_h

Description

Makes a creature use a talent or ability. Will add ability to the creature if asked to Ability Use command is added to the top of the action queue unless otherwise specified. This function is asynchronous as it uses a command.

The command can still fail if the creature doesn't have the mana to use it, etc.