RemoveSpecificEffect(int, object)

Removes effects from a creature.

void RemoveSpecificEffect(
    int nEffectTypeID,
    object oTarget
);

Parameters

nEffectTypeID

EFFECT_TYPE_*

oTarget

Target to remove the effects from


Description

Loops through all of oTarget’s effects, and removes those with the effect type specified in nEffectTypeID.



Remarks

Found in nw_i0_spells.nss line 23

In the documentation to the function, it is hinted that it is to be used for creatures exiting an AOE (area of effect) to remove effects from that AOE. It is apparently not used for this. The only place I could find that it is called from is from the script nw_s0_remeffect, where it is used to remove a series of bad effects.

Actually, this is a very nice little wrapper function that saves us a bit of work when wanting to remove effects from objects.


Requirements

#include "nw_i0_spells"

Version

1.28

Example

#include "nw_i0_spells"

void main()
{
//Unpolymorph a polymorphed PC through conversation

object oPC=GetPCSpeaker();

RemoveSpecificEffect(EFFECT_TYPE_POLYMORPH, oPC);
}

See Also

functions: RemoveEffect
categories: Effects Functions
constants: EFFECT_TYPE_* Constants


 author: Lilac Soul, additional contributor(s): Lilac Soul