How do I test to see whether a creature is under an effect? IOW, what is the syntax for: https://nwnlexicon.com/index.php?title=GetEffectType
They don’t give an example. I can define a variable, but how do I pass that as a check to the creature in question in an “if” statement?
There’s a function set up for this:
To do the check yourself, you’d cycle through the effects on the creature, and check the effect type one at a time, like this:
effect eEffect = GetFirstEffect(oTarget);
if (GetEffectType(eEffect) == nEffectType)
// Do stuff.
eEffect = GetNextEffect(oTarget);
Thanks, that helped. I didn’t need a loop but the lexicon was helpful.