The player can pick up items on ground. When picking up an item, it is destroyed and an empty item slot, picked from the left gets the name of the item. However, if 2 items are overlapping the player, both gets destroyed but only 1 item slot is used.
How can I make sure only 1 item is picked up at a time? I have tried using pick nth instance and pick random instance with sub events but it does not seem to make a difference. The player is a single object and the items belong to a family called "items".
My current logic:
player is overlapping items
interact=1
itemslot1=empty
itemslot2=empty
itemslot3=empty
trigger once
-sub event-
pick nth instance=0
-sub event action-
set itemslot1.name name=items
destroy items
As said it works fine as long as just 1 item is picked up at a time.