09.09.2018, 08:53
I have this script where the system gives items, and here's how i planned it to work
I thought I got it, but when I tested it, the break; function doesn't work. It continues to the very last slot.
Код:
- The system searches the inventory for a vacant slot. if found, the player receives level 1 version of the item and its placed on that slot, then it ends the operation. - If every slot is occupied by level 1 versions of the item, then the system will go to the first slot and "upgrade" that item to a level 2 version, then it ends the operation. - if every slot is occupied by level 2 versions of the item, then the system will go to the first slot and "upgrade" that item to a level 3 version, then it ends the operation.