I'm trying too use the if statement too add items too the players inventory, keep track of how many of that item are in the inventory, and "use" the players magicka too add more of that item when the amount drops below a certain value. Right now I can only get it too cycle one time if I place the whole string of commands in the OnEquipped() event. I have tried placing it in an Onupdate() event, but calling regesterforupdate(1) in the onequipped command does nothing...
This is what I have that works right now, even if it only cycles one time. What should I change too make it continually cycle?
Scriptname Summonerbow extends ObjectReferenceAmmo property Summonedarrow AutoEvent OnEquipped(Actor akActor)if (Game.GetPlayer().GetItemCount(Summonedarrow) <= 2) If (Game.GetPlayer().GetAV("magicka") >= 20) Game.GetPlayer().AddItem(Summonedarrow, 1, true) Game.GetPlayer().DamageActorValue("magicka", 20) Game.GetPlayer().EquipItem(Summonedarrow, false, true) endifendifendeventEvent OnUnEquipped(Actor akActor)Game.GetPlayer().removeitem(Summonedarrow, 2, true)endevent