Download

Inventory System Similar to RPG Games

I’ve been trying to create an inventory menu for my game for a week. However, in each tutorial I watched, tutorial makers are creating inventory slots one by one. For example, If I have 100 slots then I would need to create 100 slots one by one, create a variable for each one, repeat everything I did for one slot another 99 times. This seems pretty stupid to me. I just want to have a big blank area and fill that area with squares as I obtain items. Is there a tutorial, documentation, etc. where can I find how to do this? I’m okay with C++ too.

Thanks.

I do not have a tutorial but there’s no need to create anything manually. Worst case scenario, you can loop and add slots automatically.

And no, you do not need to create slots - especially if your inventory holds an undetermined number of elements. You can add widgets as direct wrap box children for example.

A good inventory system will only ever have one slot widget which then gets created and filled as needed etc.

Here is a good inventory system to start with. I started with this one myself and have been able to expand upon it myself to create the exact type of inventory system i needed.

https://www.youtube.com/watch?v=yxqSkFNAzE0&list=PL4G2bSPE_8uktjEdP4ZuRq5r2o4JMdZfM