Putting Items In Different Inventory Slots

I am trying to add a visual inventory, and I feel like I’m close! The concept is, I have a shop, I click on an item when I have enough coins and the item then disappears. When I back out, the item should be in the players inventory slots. Everything works except the item appearing in the inventory slot.

Is there a Health_Potion somewhere on the scene, you don’t create a Health_Potion anywhere?

Also, the objects are not going to keep their values from 1 scene to the next since Objects don’t actually move between scenes. You’ll need to store the values as Globals before transferring scenes and then load those values in.

Sorry I don’t have anything specifically for working with multiple scenes, but I do have a video with working with a visual inventory if you would like some extra help.

The health potion is here in my shop scene.

But then you change scenes. I don’t work too heavily with scenes, but I believe the ONLY thing that transfers from 1 thing to another scene is global variables. Having Global objects just allows you to place a new instance of that object on any scene. But instances of objects don’t share values.

Hi! Thank you for sending that tutorial. I had seen it previously and with a few tweaks got things working. Things show up in the first inventory slot, just not the second and third which I feel like is a easy fix.

Is there a way that I can make the game recognize that that the first inventory slot is full? I have it successfully able to put it in the first slot, but unable to get it to recognize that it is full and put it in the second slot. For example, when I buy a health potion from my shop, I have it put the health potion in the first inventory slot. I want to be able to go back to buy another and have it put it in the second slot

@Drona any thoughts?