How to equip item/skin before game

How to enable equipping items in shop after buying something? I’m thinking about global variable but I have no idea on how to implement it. Besides, how to save the unlocked items?
Thanks :slight_smile:

I would use a struct. For example let’s say you have a 2 unlockable swords. The initial global inventory variable would be like inventory.sword1 = 0 and inventory.sword2 = 0. Then each time you unlock one (let’s say sword2) you just set it to 1 (inventory.sword2 = 1). Save the inventory variable in a storage to save it. If you want you can also set other Infos like the price for unlocking it (for example inventory.sword1.price = 25000) but then you would have to also set a sub variable for if it was bought.

Where should I put this script? In the inventory or in all scenes?

Well variables and scripting in general are only available on event sheets so I am not sure I understand what you mean here…