This scripting forum is to discuss scripting and for those needing help scripting to get help from others.
Moderators: Mermut, rdjparadis
- Posts: 157
- Joined: Sun Sep 12, 2010 6:42 pm
This is a handy little variation on the Bioware RemoveSpellEffects function, but does not require the caster as an input. Handy in spell scripts for preventing stacking.
Code: Select all
void RemoveEffectFromSpellID(int nSpell_ID, object oTarget)
//Declare major variables
effect eRemove = GetFirstEffect(oTarget);
//If the effect was created by the spell then remove it
if(GetEffectSpellId(eRemove) == nSpell_ID)
eRemove = GetNextEffect(oTarget);