GetHasEffect
From NWN Lexicon
Contents |
[edit] GetHasEffect(int, object)
Determines whether a creature has an effect.
int GetHasEffect( int nEffectType, object oTarget = OBJECT_SELF );
[edit] Parameters
nEffectType
The type of effect, from the constant list EFFECT_TYPE_*, we are interested in.
oTarget
The object to investigate. (Default: OBJECT_SELF)
[edit] Description
Returns TRUE if oTarget has the effect nEffectType active, otherwise FALSE.
[edit] Requirements
#include " x0_i0_match "
[edit] Version
1.28
[edit] Example
<nowiki>#include "NW_I0_GENERIC" </nowiki>void main() { int isPoisoned = GetHasEffect(EFFECT_TYPE_POISON, GetFirstPC()); int isParalyzed = GetHasEffect(EFFECT_TYPE_PARALYZE, GetFirstPC()); }
[edit] See Also
constants: |
author: Tom Cassiotis, editors: Charles Feduke, Mistress