Difference between revisions of "Ability ApplyUpkeepEffects"
From Dragon Age Toolset Wiki
m (Cleaning up prior to review) |
m (Enabling headings) |
||
Line 5: | Line 5: | ||
|param1type = object | |param1type = object | ||
|param1name = oCaster | |param1name = oCaster | ||
− | |param1desc = The | + | |param1desc = The caster of the ability on which the upkeep will be applied. |
|param1default = | |param1default = | ||
|param2type = int | |param2type = int | ||
|param2name = nAbility | |param2name = nAbility | ||
− | |param2desc = The | + | |param2desc = The ability itself. |
|param2default = | |param2default = | ||
|param3type = effect | |param3type = effect | ||
|param3arra = yes | |param3arra = yes | ||
|param3name = eEffects | |param3name = eEffects | ||
− | |param3desc = The | + | |param3desc = The effects on which the upkeep come from. |
|param3default = | |param3default = | ||
|param4type = object | |param4type = object | ||
|param4name = oTarget | |param4name = oTarget | ||
− | |param4desc = The | + | |param4desc = The target is the caster. It is not needed to change the default value. |
|param4default = OBJECT_INVALID | |param4default = OBJECT_INVALID | ||
|param5type = int | |param5type = int | ||
Line 29: | Line 29: | ||
|sourcemodule = Core Game Resources | |sourcemodule = Core Game Resources | ||
}} | }} | ||
− | + | == Description == | |
− | + | ||
<!-- This section contains the full description from the functions comments. Do not change unless you are confident these are incomplete or incorrect. --> | <!-- This section contains the full description from the functions comments. Do not change unless you are confident these are incomplete or incorrect. --> | ||
Upkeep effects are permanent until the effect is removed. They also set the UI-icon toggle inside the effect based on the ability ID. | Upkeep effects are permanent until the effect is removed. They also set the UI-icon toggle inside the effect based on the ability ID. | ||
− | |||
<!-- == Remarks == --> | <!-- == Remarks == --> | ||
<!-- This section contains additional comments, observations and known issues. --> | <!-- This section contains additional comments, observations and known issues. --> | ||
− | + | == Examples == | |
− | + | ||
− | + | ||
<!-- This section contains examples transcluded from the snippet library. --> | <!-- This section contains examples transcluded from the snippet library. --> | ||
− | + | The following snippet is taken from the function itself: | |
<dascript> | <dascript> | ||
Line 52: | Line 48: | ||
for(i = 0; i < nCount; i++) | for(i = 0; i < nCount; i++) | ||
{ | { | ||
− | _ApplyUpkeepEffect( oCaster, eEffects[i], nAbility, oTarget, bPartywide); | + | _ApplyUpkeepEffect(oCaster, eEffects[i], nAbility, oTarget, bPartywide); |
} | } | ||
Line 59: | Line 55: | ||
// apply the effect on the target (caster) | // apply the effect on the target (caster) | ||
− | ApplyEffectOnObject(EFFECT_DURATION_TYPE_PERMANENT, eUpkeep, oCaster, 0. | + | ApplyEffectOnObject(EFFECT_DURATION_TYPE_PERMANENT, eUpkeep, oCaster, 0.0, oCaster, nAbility); |
</dascript> | </dascript> | ||
== See also == | == See also == | ||
<!-- This section contains links to articles, functions or constant groups. --> | <!-- This section contains links to articles, functions or constant groups. --> | ||
− | [[Ability_ApplyUpkeepEffect]] | + | [[_ApplyUpkeepEffect]], [[Ability_ApplyUpkeepEffect]] |
Latest revision as of 12:48, 26 April 2012
void Ability_ApplyUpkeepEffects(
object oCaster,
int nAbility,
effect[] eEffects,
object oTarget = OBJECT_INVALID,
int bPartywide = FALSE
);
object oCaster,
int nAbility,
effect[] eEffects,
object oTarget = OBJECT_INVALID,
int bPartywide = FALSE
);
- Parameters:
- oCaster
- The caster of the ability on which the upkeep will be applied.
- nAbility
- The ability itself.
- eEffects
- The effects on which the upkeep come from.
- oTarget
- The target is the caster. It is not needed to change the default value.
- bPartywide
- Is the Effect party wide or not.
- Returns:
- Nothing.
- Source:
- Core Game Resources.ability_h
Description
Upkeep effects are permanent until the effect is removed. They also set the UI-icon toggle inside the effect based on the ability ID.
Examples
The following snippet is taken from the function itself:
// as explained above, the Target becomes the Caster. if(!IsObjectValid(oTarget)) { oTarget = oCaster; } // now loop through the Effects[i] for(i = 0; i < nCount; i++) { _ApplyUpkeepEffect(oCaster, eEffects[i], nAbility, oTarget, bPartywide); } // define the spell's mana cost or talent's stamina cost effect eUpkeep = EffectUpkeep(UPKEEP_TYPE_MANASTAMINA , fCost, nAbility, oTarget, bPartywide); // apply the effect on the target (caster) ApplyEffectOnObject(EFFECT_DURATION_TYPE_PERMANENT, eUpkeep, oCaster, 0.0, oCaster, nAbility);