Tes3Mod:RemoveSpell

The UESPWiki – Your source for The Elder Scrolls since 1995
Jump to: navigation, search


RemoveSpell

                RemoveSpell, SpellID

        Where   SpellID = Spell to remove

        Type:   Magic

     Returns:   none

     Example:   Player->RemoveSpell, "Vampire Attributes"
                RemoveSpell, stamina
        
     Scripts:   Vampire_Cure_PC
                diseaseAshChancre

Removes the spell from the calling actors known spell list or affecting spells. If the spell is a normal spell, it is removed from the actor's list of known spells. If the spell is a curse/disease it is removed from the list of spells currently affecting the actor.

A bug vaguely related to this function is that if a creature dies with a curse type spell on it, then any other creature of that type you encounter from that point on will also be affected by that curse. To fix this simply call RemoveSpell in an OnDeath clause in a script attached to the creature. The fact that this happens in the first place suggests that the spell is added to the creature definition, and not just that particular instance of the creature.

See Also: RemoveEffects, RemoveSpellEffects