I'm new to this and am struggling with making this inventory system work.
In the game you can pickup items. your inventory has 4 slots and each slot can hold 1 type of item at a time and only a quantity of 1 at a time (items don't stack).
Right now i have it to where when you drag the item over your pack the sprite is deleted and a smaller version of the item is spawned in slot 1 in the inventory. but i'm stuck on when i go to pickup another item how do i make it choose the next available slot instead of using the same one?
I have very little knowledge with arrays so if the answer lies there i might need some extra detail.