GameSalad Project - Inventory
This is my approach to adding and removing a number of items from and to an inventory bar at the bottom of the screen.
When an item is removed the items in the slots to the right of that item shift left by one so that there aren’t any empty slots between the items.
In a proper game you wouldn’t just remove an item from the bar by clicking it but the behaviours and logic would be very much the same when you’ve used or discarded an item.
It uses a table to store what items are in what slot. In this version it only stores the name of the item, but you may need more information for your game to function properly.
This could be used as an inventory bar, a skill bar, an orders bar, slots for cards, or even a word game.
Click the link above to download the zip file.