> The swapping already works. This was tested before the system got more complex.
>
> However I will take your advice and make a check when something is picked up and run the loop afterwards. I will also try "else" to check if all slots are filled.
>
> Thanks!
Oh okay, what isn't working?
I figured out another way to solve it. If player overlaps an item and picks it up the item is destroyed, preventing actions further down the code. So I just placed each event in order in the sheet starting with if itemslot=3 then itemslot=4 etc.
Like this:
If player overlaps item
Picks up
itemslot=3
itemslot=empty
-set itemslot filled
-destroy item
If player overlaps item
Picks up
itemslot=4
itemslot=empty
-set itemslot filled
-destroy item
If player overlaps item
Picks up
itemslot=5
itemslot=empty
-set itemslot filled
-destroy item
Since the item is destroyed when one of these are true it simply stops the next event since the player is not overlapping item anymore.
After these events I replaced the =empty with =filled and repeated the events but adding the replace actions.
This works nicely since I will not have more than a maximum of 6 itemslots, so code won't be too long. Just thought I'd let you know how I solved it.