brothir Posted November 10, 2013 Share Posted November 10, 2013 I'm making a mod where I rework spells such as Night Eye to be toggleable. They are also supposed to end when the user has no magicka left. Scriptname aaaNightEyeScriptEffect Begin ScriptEffectStart If ( player.IsSpellTarget NightEyeScriptEffect == 0 ) player.AddSpell NightEyeScriptEffect else player.RemoveSpell NightEyeScriptEffect endif End Begin ScriptEffectUpdate if ( player.GetActorValue Magicka < 1 ) player.RemoveSpell NightEyeScriptEffect endif End The problem here is with the ScriptEffectUpdate: it doesn't end the spell when the user's magicka is less than 1 (or any value for that matter, tested it on <10 etc.). For reference, the NightEyeScriptEffect is an ability that grants Night Eye and damages 4 magicka, so that every second you have the spell active you lose 4 magicka. Any help would be much appreciated. Link to comment Share on other sites More sharing options...
Lanceor Posted November 10, 2013 Share Posted November 10, 2013 What's the duration of the spell that aaaNightEyeScriptEffect is attached to? If it is set to zero, ScriptEffectUpdate will never fire. Link to comment Share on other sites More sharing options...
brothir Posted November 10, 2013 Author Share Posted November 10, 2013 Ah, so that's how it works. Figured it out now, thanks a lot :laugh: Link to comment Share on other sites More sharing options...
Recommended Posts