GetHasSpellEffect(int, object)
Determines whether an object is under the effects of a spell.
int GetHasSpellEffect( int nSpell, object oObject = OBJECT_SELF );
Parameters
nSpell
oObject
The object to investigate. (Default: OBJECT_SELF)
Description
Returns TRUE if oObject has effects originating from nSpell, otherwise FALSE. Only temporary and permanent effects will ever be on a creature for this to pick up, of course.
Spell files which apply an effect in a DelayCommand, will not be picked up by this, because the effect wasn't applied at the exact time the spell script was run (according to Bioware).
Remarks
Can be used to see if a spell is active on a creature to avoid from casting the same buff spell on the target.
Version
1.22
See Also
categories: | Spell Casting Effects Functions |
constants: | SPELL_* Constants |
author: Tom Cassiotis, editor: Jasperre
Send comments on this topic.