Jump to content

How to dispel script effects that are in active effects


brothir

Recommended Posts

I'm trying to make a bucn of different spells toggleable, so that one doesn't have to renew them all the time. I have the following script:

Scriptname aaaNightEyeScript

Begin ScriptEffectStart

	If ( player.IsSpellTarget NightEyeScriptEffect == 0 )
		player.AddSpellNS NightEyeScriptEffect  
; spell is an ability: gives night eye, damages 4 magicka (per second)
	else
		player.RemoveSpell NightEyeScriptEffect
		player.Dispel aaaToggleableNightEye
	endif
End


Begin ScriptEffectUpdate

	if ( player.GetActorValue Magicka < 1 )
		player.RemoveSpell NightEyeScriptEffect
		player.Dispel aaaToggleableNightEye
	endif

End


The duration of the spell aaaToggleableNightEye is 10000 seconds, and even with the player.dispel the script effect stays in the Active Effects menu and as an icon with a timer in the upper right screen. As far as I've understood, dispel should remove that but it doesn't in the above script. What am I doing wrong?

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...