Is there some quirk about setting a quest variable in the same frame or something? I tried a utility.wait(1) command but it didn't help.
Scriptname DetectLifeVampireToggleScript extends ActiveMagicEffect Spell Property VampireDetectLifeToggleSpell autoPlayerVampireQuestScript Property PlayerVampireQuest Auto Event OnEffectStart(Actor akTarget, Actor akCaster) if(akCaster == Game.GetPlayer()) if PlayerVampireQuest.DetectLifeToggleVar == 1 debug.notification ("detect life was on, turning it off by setting it to 0"); ; turn the toggle to 0 to disable the effect PlayerVampireQuest.DetectLifeToggleVar = 0 else ; turn the toggle to 1 to keep the effect looping AND cast the spell PlayerVampireQuest.DetectLifeToggleVar = 1 debug.notification("detect life was not on, so we are turning it on to 1") VampireDetectLifeToggleSpell.Cast(akCaster,akCaster) endif endifendEvent


