I have been searching the net and through forums but I have not found anything that appears to address the issue I am having. According to all the examples and tutorials I have gone through the below script should work and the "state" of the event should change from one to the other. The issue I am seeing is that in game the only state that ever gets executed is the "Auto" one. As far as I understand, I don't need to declare an empty state since this is extends a base script. Can anyone see an issue with this script or explain why it is does change state in game? Thanks for any help.
Scriptname MagicEffectPayMagickaDebit extends ActiveMagicEffect
{This script debits and refunds a Magicka debit for a toggle effect.}
MagicEffect Property akEffect Auto
Float Property akEffectCost Auto
State Refund
Event OnEffectStart(Actor akTarget, Actor akCaster)
Game.GetPlayer().ModActorValue("Magicka", akEffectCost)
Debug.Notification( akEffectCost + " Magicka refunded to player for " + akEffect.GetFormID())
GoToState("PayCost")
EndEvent
EndState
Auto State PayCost
Event OnEffectStart(Actor akTarget, Actor akCaster)
Game.GetPlayer().ModActorValue("Magicka", akEffectCost * -1)
Debug.Notification("Player pays initial Magicka debit for " + akEffect.GetFormID())
GoToState("Refund")
EndEvent
EndState


