Difference between revisions of "Talk:RemoveSpell"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
Tag: Reverted
Tag: Manual revert
 
Line 6: Line 6:


[[User:Syscrusher|Syscrusher]] ([[User talk:Syscrusher|talk]]) 01:32, 28 December 2014 (EST)
[[User:Syscrusher|Syscrusher]] ([[User talk:Syscrusher|talk]]) 01:32, 28 December 2014 (EST)
== Does this command work on removing lesser powers at all? ==
As soon as I try to remove a lesser power spell through the script, the code dies. If I try to remove a regular spell though, it works.

Latest revision as of 20:58, 24 April 2024

Based on my testing, it appears that RemoveSpell will remove a spell from an NPC's spellbook, but if that spell happened to be the "equipped" spell for the NPC, they can still continue to cast it until they equip something else.

My situation was an NPC who needed to have a spell temporarily for one encounter with the player, then be denied that spell later. I confirmed with RefScope that the spell got removed from the NPC's spellbook by my script logic, after the first encounter. But at the second encounter, the NPC still could cast that spell.

The only workaround I have found is that the NPC *never* has the spell in their spellbook. Rather, at the one time they should cast it, I have the NPC's object script call Cast of the spell without it being in their spellbook. That works because Cast does not require the spell to be "known" to the actor.

Syscrusher (talk) 01:32, 28 December 2014 (EST)