Difference between revisions of "Engine ApplyEffectOnObject"
From Dragon Age Toolset Wiki
m |
m (Correcting category, adding remarks) |
||
Line 4: | Line 4: | ||
|param1type = int | |param1type = int | ||
|param1name = nDurationType | |param1name = nDurationType | ||
− | |param1desc = [[EFFECT_DURATION_TYPE_* | + | |param1desc = an [[EFFECT_DURATION_TYPE_*]] constant or literal |
|param1default = | |param1default = | ||
|param2type = effect | |param2type = effect | ||
Line 16: | Line 16: | ||
|param4type = float | |param4type = float | ||
|param4name = fDuration | |param4name = fDuration | ||
− | |param4desc = the duration in seconds (only | + | |param4desc = the duration in seconds (only for temporary effects) |
|param4default = 0.0 | |param4default = 0.0 | ||
|param5type = object | |param5type = object | ||
|param5name = oCreator | |param5name = oCreator | ||
|param5desc = effect creator | |param5desc = effect creator | ||
− | |param5default = | + | |param5default = OBJECT_SELF |
|param6type = int | |param6type = int | ||
|param6name = nAbilityId | |param6name = nAbilityId | ||
Line 31: | Line 31: | ||
|sourcemodule = | |sourcemodule = | ||
}} | }} | ||
− | |||
== Description == | == 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. --> | ||
− | Applies eEffect to oTarget. If nDurationType is EFFECT_DURATION_TYPE_TEMPORARY, then fDuration is the duration of the effect. | + | Applies <code>eEffect</code> to <code>oTarget</code>. |
+ | |||
+ | If <code>nDurationType</code> is <code>EFFECT_DURATION_TYPE_TEMPORARY</code>, then <code>fDuration</code> is the duration of the effect. | ||
Use [[core_h]].[[ApplyEffectToObject]] instead of calling this directly. | Use [[core_h]].[[ApplyEffectToObject]] instead of calling this directly. | ||
− | + | == Remarks == | |
− | + | ||
<!-- This section contains additional comments, observations and known issues. --> | <!-- This section contains additional comments, observations and known issues. --> | ||
− | + | The [[EFFECT_DURATION_TYPE_*]] constant which are valid for the <code>nDurationType</code> parameter are: | |
+ | * <code>EFFECT_DURATION_TYPE_INSTANTANEOUS</code> | ||
+ | * <code>EFFECT_DURATION_TYPE_PERMANENT</code> | ||
+ | * <code>EFFECT_DURATION_TYPE_TEMPORARY</code> | ||
<!-- == Examples == --> | <!-- == Examples == --> | ||
<!-- This section contains examples transcluded from the snippet library. --> | <!-- This section contains examples transcluded from the snippet library. --> | ||
− | |||
<!-- == See also == --> | <!-- == See also == --> | ||
<!-- This section contains links to articles, functions or constant groups. --> | <!-- This section contains links to articles, functions or constant groups. --> | ||
− | + | [[Category:Effect functions]] | |
− | [[Category: Effect | + |
Latest revision as of 19:59, 10 March 2012
This function applies an effect on an object.
void Engine_ApplyEffectOnObject(
int nDurationType,
effect eEffect,
object oTarget,
float fDuration = 0.0,
object oCreator = OBJECT_SELF,
int nAbilityId = 0
);
int nDurationType,
effect eEffect,
object oTarget,
float fDuration = 0.0,
object oCreator = OBJECT_SELF,
int nAbilityId = 0
);
- Parameters:
- nDurationType
- an EFFECT_DURATION_TYPE_* constant or literal
- eEffect
- the effect to be applied
- oTarget
- the target of the effect
- fDuration
- the duration in seconds (only for temporary effects)
- oCreator
- effect creator
- nAbilityId
- ability ID of the effect (important for dispelling)
- Returns:
- Nothing.
- Source:
- script.ldf
Description
Applies eEffect
to oTarget
.
If nDurationType
is EFFECT_DURATION_TYPE_TEMPORARY
, then fDuration
is the duration of the effect.
Use core_h.ApplyEffectToObject instead of calling this directly.
Remarks
The EFFECT_DURATION_TYPE_* constant which are valid for the nDurationType
parameter are:
-
EFFECT_DURATION_TYPE_INSTANTANEOUS
-
EFFECT_DURATION_TYPE_PERMANENT
-
EFFECT_DURATION_TYPE_TEMPORARY