How would I go about making an inventory system? I would like to make it so that, when the player presses a button, that selected weapon will be added to their inventory. If however, another button which contains a weapon of higher power is added to the players inventory, the more powerful weapon is displayed first. (Basically Id like to store the players items and order them by power). How would I do this please? Would I have to use an array, and if so how?
-Thanks in advance