Thank you, that was really helpful. definitely going to try functions out.
Well I got the system working now.
You can buy weapons by pressing UP when you overlap the matching weapon icon. this unlocks the weapon.
When you bought/unlock it, the icon changes to a equip button and lets you change your weapon to the matching icon.
When you don't have enough money the amount of gold text will flash to show that.
when you leave and re-enter the room, you still will have the weapons unlocked that you had before you left the room. This was done by giving the sword icon object a persist behavior.
So that's basically everything I wanted.
Here is a screenshot of the code:
As you can see I barely used any variables which make the evensheet really big and messy.
The cost of weapons also arent in a variable, because the costs are based on animations, not individual objects.
The only variables used are: total_money, current_weapon.
And here is the capx if anyone wants to copy everything: capx.
If you have suggestions on how to simplify and make the events more efficient, please tell.
thanks!