or3o Posted May 14, 2012 Author Share Posted May 14, 2012 Does anyone know how to use an item that isnt in your inventory? basically I wanna make a button that uses an item but Im pretty sure when you use an item it checks to make sure its in your inventory first, I just wanna make it check my item editor for whatever number I want the item to be and just use it straight from there. if anyone can guide me in the right direction I would appriceate it very much. Link to comment Share on other sites More sharing options...
Stein Posted May 14, 2012 Share Posted May 14, 2012 Why not write the button function without the item? Since it's not going to be in your inventory anyway. Link to comment Share on other sites More sharing options...
or3o Posted May 14, 2012 Author Share Posted May 14, 2012 because im a total noob i guess, ill try n figure out how to do than now :) thanks.I am still not sure I can do that :/ basically i added the crafting system but instead of using recipes as items i just wanted to make a list of avalible recipes. if I do the function for each button i wouldnt be able to use the item editor to edit the recipes anymore right? sorry i keep asking soo many questions. I am just a noob trying to figure this stuff out. Link to comment Share on other sites More sharing options...
Stein Posted May 14, 2012 Share Posted May 14, 2012 Ah, I see. Well.. Sadly the recipe system he uses is based on items. It can be re-written to be completely UI based but it'll take more than a single line to edit I'm afraid. You could send a list to the client side of the recipes when they are queried for though, and let the client handle the UI side of showing whether or not you have the proper materials around. Then send back a query to the server requesting approval of the item being crafted, the server checks if the user has the items and combines them.. Then updates the inventory with a nice little complete message.It's doable, but it'll be a bit of work to get right(This was my original approach at doing it myself actually, before I decided I liked the recipe item idea for a goldsink and just rewrote that part of the system to support more materials and options :P). Link to comment Share on other sites More sharing options...
or3o Posted May 14, 2012 Author Share Posted May 14, 2012 thanks agian! i was just considering doing away with the whole recipe as an item anyway. ill just make a new editor for recipes and it shouldnt be all that difficult. (better than my original plan of remaking a whole different inventory setup for em.) lol 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