Ability UseAbilityWrapper

From Dragon Age Toolset Wiki
Revision as of 00:39, 25 February 2010 by BryanDerksen (Talk | contribs) (Created page with '{{dafunction |name = Ability_UseAbilityWrapper |brief = Simple wrapper to use a modal ability on a creature |param1type = object |param1name = oCreature |param1desc = Creature us...')

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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.