Does anyone know how to do this?
Function Cast(ObjectReference akSource, ObjectReference akTarget = None) native
But can I make the player cast a healing spell for example on himself this way?
MySpell.Cast(Game.GetPlayer(), Game.GetPlayer())
MySpell.Cast(Game.GetPlayer(), Game.GetPlayer())
EVENT onInit() ; This event will run once, when the script is initialized registerForUpdate(2) gotoState ("polling") endEVENT STATE polling EVENT onUpdate() if IsDead() == 1 ;No idea how to refer to the actor running the script. Debug.MessageBox("Script Triggered!") MySpell.Cast(Game.GetPlayer(), Game.GetPlayer()) endif endEVENTendSTATE