Hello everyone!!!
i created an inventory same as c e in g develop examples list
I have to say it’s very well done…
however I can not understand how I can make the objects available … let me explain …
if I have 3 cherries… and I pick 2 more… how do I add them to the items I have available that I can then add to my inventory???
the example works on objects already present in the scene… but put into practice… how does it actually work??? I pick an apple and this apple?? How do I tell the inventory to add it to the number of apples???
thanks for your reply
I didn’t quite understand the example… now yes… just put the objects into play…
but now it gets complicated… because I have 2 containers…
one is the inventory of the example… the other is a top bar where I can choose items from the inventory and bring them into the game… a bit like when choosing a weapon…
what solution could i adopt???
eh this is the problem I don’t have a way… how do I duplicate??? them at the end… if I put an empty slot when I pick up an object it will first occupy the one in the top bar or drag the sclot and the counter via touch… but I don’t know how I could do it…
By duplicate, I meant: if click is on apple + if cursor is on inventory + if there’s a free slot in the top bar: create apple in top bar, create text object QuantityCounter, link it to apple, and modify text to (inventory_count,apple).
Something like that…