Hey folks!
I've read a lot of array tutorials etc but i've been stuck on this inventory feature, it's pretty much the first time I'm doing one of these.
My inventory is a fixed 6 slot INV made of 6 instances of an object called InventorySlot. the object has 3 variables : ID, Content, and an "full" bool to check its state.
I also have an array called "INVArray" with 6 elements.
The idea is that, when I pickup an item on the ground, I fetch the item name (stored in a instanced string) and store it in a global var "itempickedup".
When the item is picked up, it triggers a function CheckInventorySpace that, in theory, should loop for all 6 elements of the array, find the first cell available, check if it is empty, and set its value to "itempickedup". But it doesn't work!
I manage to update the first cell and send the item name to the array, but it won't work after that.
What am I doing wrong?
Thank you in advance!