Thanks a ton. I got it working with this code:
Scriptname DetectLifeVampireToggleScript extends ActiveMagicEffect Spell Property VampireDetectLifeToggleSpell autoPlayerVampireQuestScript Property PlayerVampireQuest Auto Event OnEffectStart(Actor akTarget, Actor akCaster) if(akCaster == Game.GetPlayer()) if PlayerVampireQuest.DetectLifeToggleVar == false debug.notification ("detect life was off, turning it on by setting it to true") PlayerVampireQuest.DetectLifeToggleVar = true VampireDetectLifeToggleSpell.Cast(akCaster,akCaster) else PlayerVampireQuest.DetectLifeToggleVar = false endif endifendEvent
However, the glow on nearby life is sporadic. It glows for a second or two, then shuts off, the spell recasts, sometimes it works, sometimes it doesn't.
Here is my code from the life detect spell:
Scriptname DetectLifeVampireDummyScript extends activemagiceffect PlayerVampireQuestScript Property PlayerVampireQuest Auto Spell Property VampireDetectLifeToggleSpell auto;this is a property to the effects mother spell;old codeEvent OnEffectFinish(Actor akTarget, Actor akCaster) if PlayerVampireQuest.DetectLifeToggleVar == true Debug.notification("var was true, keeping the spell alive") VampireDetectLifeToggleSpell.Cast(akCaster, akTarget) else debug.notification("dummy spell did not stay alive") endif endEvent
The spell VampireDetectLifeToggleSpell has the dummy script as an effect, and the 4 detect life magic effects:
DetectLIfeEnemyInteriorSelfFF
DetectLIfeEnemyExteriorSelfFF
DetectLIfeFriendInteriorSelfFF
DetectLIfeFriendExteriorSelfFF
I have magnitude set to 0, area 150 and a duration of 5. I upped the 5 to 15 but it didn't help.
Any clues? All I want to do is make a life detect spell you can toggle on/off like you could do with Oblivion.