Semeren151 Posted May 30, 2011 Share Posted May 30, 2011 I've had this idea in my head for a while now. I want to be able to equip my bow with a script attached to it that will equip a stack of specified ammo when I equip the bow. I've tried writing a few of my own scripts but the equipitem function only equips a maximum of one item from a stack. I was wondering if maybe I am using the function incorrectly (I'm relatively new at writing a script from scratch) or if there is another function I could use for the desired effect. Link to comment Share on other sites More sharing options...
The_Vyper Posted May 30, 2011 Share Posted May 30, 2011 I've had this idea in my head for a while now. I want to be able to equip my bow with a script attached to it that will equip a stack of specified ammo when I equip the bow. I've tried writing a few of my own scripts but the equipitem function only equips a maximum of one item from a stack. I was wondering if maybe I am using the function incorrectly (I'm relatively new at writing a script from scratch) or if there is another function I could use for the desired effect.I actually had the same idea some time ago. I had the same issue, too. The problem withe the EquipItem command is that it will only equip 1 item from a stack no matter how you word it, which makes it (almost) useless for arrows. To work around it you can remove all but one arrow before equipping and adding them back afterwards, which will equip the others - but that will not make the quiver on the back in 3rd person mode update correctly.The script for that looks something like: scn MyBowScript short ArrowCount Begin OnEquip Player Set ArrowCount to player.GetItemCount ArrowID - 1 Player.RemoveItem ArrowID ArrowCount Player.EquipItem ArrowID Player.AddItem ArrowID ArrowCount End That may not be the exact wording needed for this (it's been a while since I did this), but it should at least point you in the right direction. You might also want to check out Enhanced Hotkeys. One of the features is that it has a special Bow+Arrows hotkey item that, when used, equips a bow + arrows. Link to comment Share on other sites More sharing options...
Semeren151 Posted May 30, 2011 Author Share Posted May 30, 2011 (edited) I'll try out that script and see what I can do with it. Thanks for the help. Edited May 30, 2011 by Semeren151 Link to comment Share on other sites More sharing options...
Recommended Posts