I'm trying to make magicka regenerate while the player is casting spells. I'm not sure how to go about this, but I assume it has to do with creating an invisible quest which has a script attached. I'm pretty clueless about how to do scripting in the Creation Kit, but I do have programming background in Java and C, so understanding the code itself shouldn't be a problem. Here is the script I started (it doesn't compile). Once the script is working, how do I get it running during the game? Scriptname tomfranklyRegenWhileCasting extends Actor
Event OnInit() ; This event will run once, when the script is initialized
RegisterForUpdate(1)
GotoState ("polling")
EndEvent
State polling
Debug.Trace("Polling!")
While (player.iscasting > 0)
Debug.Trace("CASTING!")
endWhile
EndState
State active
; Do nothing in here
EndState