I am trying too make a script for a bow that, when activated, adds arrows too the players inventory, equips these arrows, AND damages the players magicka too simulate magicka being used too "summon" the arrows. It is supposed too be a continually running script that keeps track of the number of arrows in the inventory and only summon more arrows when this number drops below the minimum. I know I could probably just have the bow use a spell effect too summon the arrows now, but this script is just a stepping stone too a much more complex mod I have in the works. And the more complex mod will need too use the additem command instead of a spell.
Right now, the script only cycles once. The magicka use part of the script works just fine, it does damage my magicka like it is trying too add the arrows. But for some reason, I just can't get the script too add any arrows too my inventory, none show up. I also need too figure out how too get this monitor, additem, damage magicka cycle too operate continuously, when the bow is equipped, without the player having too do anything.
This is what I have too start out with... Any ideas what I am missing here too get it too work properly? It compiles correctly and says there are no errors...
Scriptname Summonerbow extends ObjectReferenceAmmo property DaedricArrow AutoEvent OnEquipped(Actor akActor)if (Game.GetPlayer().GetItemCount(DaedricArrow) < 2) Game.GetPlayer().AddItem(DaedricArrow, 1, true) Game.GetPlayer().DamageActorValue("magicka", 20) Game.GetPlayer().EquipItem(DaedricArrow, false, true)endifendeventEvent OnUnEquipped(Actor akActor);Game.GetPlayer().removeitem(Summonedarrow, 2, true)endeventthe extra code in the additem part are too add the amount of arrows and too make it do that without posting a message. As discribed in the creation kit wiki. So yes, I have already been using the wiki but can't find the right information there too make this work...

