Before i start, I know this subject has been discussed before and I have read through the topics I can find. but most are to complicated for what I need or not relevant to what I need.
I want to build an inventory that works as follows:
I know how to do the above... next the bit I cant do:
any help would be very helpful
I'm not exactly sure what you consider simple, but unless you're only going to have an inventory big enough for a couple items, you'll need to get comfortable using Arrays. There are some very helpful tutorials going over the basics of array in the tutorials sections of the site. I'd recommend you check them out.
Here's an annotated demo. The inventory is stored in an array, so it will be saved between layouts.
I hope this helps.
thanks for the response, that looks exactly what i am looking for, however your capx was made in the 121 beta, so i cant load it into my 119 stable, could you possibly save your 121 capx as a 119 for me please
Develop games in your browser. Powerful, performant & highly capable.
I have been playing around with this and come up with a very simple way of doing this using the dictionary. I found that arrays were just too complicated, and overkill.
thanks for sharing the inventor
but i have problem when i change layout it reset the inventory
oh player moves from layout 1 to layout 2, inventory remains intacked. i didnt see