GetEffectType
Contents |
[edit] GetEffectType(effect)
Get the type constant of the effect.
int GetEffectType( effect eEffect );
[edit] Parameters
eEffect
The effect to compare or examine.
[edit] Description
Returns the effect type (EFFECT_TYPE_*) of the effect being examined.
Return EFFECT_TYPE_INVALIDEFFECT if effect is invalid.
[edit] Remarks
You must first create and place the effect you wish to examine into a variable before calling this function. Useful when you need to check if a player is under the effects of a certain type before doing something else to them with your scripts. A good example would be checking for protection from evil effects before allowing an evil creature to close to them.
Certain type of valid effects also returns EFFECT_TYPE_INVALIDEFFECT, namely:
Knockdown
Taunt
Summon
EDIT FROM PREVIOUS REMARKS: It was previously mentioned that visual effects have no effecttype. This is incorrect, this function will return EFFECT_TYPE_VISUALEFFECT for visual effects.
[edit] Version
1.61
[edit] See Also
functions: | |
constants: |
author: John Shuell, editor: Lilac Soul