When I pick up an item it’s supposed to add it to the next empty slot. However, it adds it to the last slot and goes to the top.
1 Like
You’re removing the slot with ‘remove index’, and you’re using ‘add’, which puts items on the end anyway.
Try getting rid of both, and using SetArrayElem with that index integer.
You find an empty slot, Remove it and then Add. If the empty slot happens to be in the middle of the array, that element gets removed, the array shrinks. And then you add at the end.
Did you mean to Insert the elements at index instead?
edit: I take it back. Set Array Elem makes most sense in this instance!
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.