Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Using an item without it being in your inventory


or3o
 Share

Recommended Posts

      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

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

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...