Inventory example please!

I’m have a lot of trouble with making an inventory, if anyone has an inventory already made, please give an example of the code. I’m trying to make an inventory that way throughout my game as people collect stuff it will go into the next available slot, and when an item is no longer useful it will be deleted from it.
I don’t know how to make it so it checks which slot is free and puts the object in that one. I’m trying to make it with one sprite for the slots, but I don’t know how to set the variables. Also do I make separate objects or different animations for the slot sprite so you can see the objects you have . I’m sorry for the long post I just want to be specific because I can’t make my game without this inventory system.

Here’s an example project from the GDevelop website, there might be other examples, but this is the one I found

Thank you, it’s helpful but that type of inventory wouldn’t work with my game. Thank you though!

1 Like