Scrumch Posted October 26, 2020 Share Posted October 26, 2020 I've tuned up my bow fully now, but the only hitch I have is that I have to manually drag the arrows into the bow's inventory. What I would like is something like how you can right click on slingshot ammo to load it into the slingshot's inventory, or right clicking on an item to equip it when that's valid. What's the modding way to do this? Thanks. Link to comment Share on other sites More sharing options...
Yakuzashi Posted October 26, 2020 Share Posted October 26, 2020 I will take a look when I am home. Fear not, I will do my best. Cheers! 1 Link to comment Share on other sites More sharing options...
IronHunter Posted October 26, 2020 Share Posted October 26, 2020 It sounds like you need to append something to the action to load ammo? As I think it checks for slingshot ammo tags. 2 Link to comment Share on other sites More sharing options...
Scrumch Posted October 26, 2020 Author Share Posted October 26, 2020 I've seen how to create an action (like when you mouse over a weapon and you see 'equip' - that word is an action) but I've no idea how to turn that into something that'll load the item into that unique inventory slot. Link to comment Share on other sites More sharing options...
Yakuzashi Posted October 26, 2020 Share Posted October 26, 2020 At first I wanted to add custom action for reloading, but after 2 hours of digging in game files I have found the easier way. You just need to add this inst:AddTag("slingshotammo") inst:AddTag("reloaditem_ammo") : above if not TheWorld.ismastersim then return inst end inside your ammo/arrows.lua and this: inst:AddComponent("reloaditem") under "if not TheWorld.ismastersim ". It's simple solution. It of course lacks elegance, but at the end of the day it works. Cheers! 1 Link to comment Share on other sites More sharing options...
Scrumch Posted October 27, 2020 Author Share Posted October 27, 2020 (edited) Sorry, I probably should've mentioned I made a widget for the inventory of the bow - so I can't add the arrow to the bow using that method. I CAN add the arrows to the slingshot - so I'm assuming it's something that the slingshot's inventory widget has. Edit: Sorted it! I changed the statement that only allows arrows to be stored in that slot to be closer to how the slingshot does it. Edited October 28, 2020 by Scrumch 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now