Upgrade

I’m trying to make an upgrade system where you have this bar-thingy which contains multiple boxes, as you click the “+” button to buy an upgrade, the boxes turn green one after the other. so when you press it once, the first box turns green, when you press it again, the second box turns green and so on. I have messed around a bit but I’m not even close to figuring out how to do this… can somebody help me? :slight_smile:

(the red boxes are just UI images)

3045997--228354--Skjermbilde.PNG

Do you have any code to show what you’ve tried so far?
Easier to try to work with what you have that try to invent something entirely out of the air :slight_smile:

1 Like

sadly I deleted it all because nothing works and I have no idea where to start :confused:

lol… well, here are some small tips to start.
So, (i’m jabbing in the dark here…)
You have 5 upgrade slots.
You have to check if you can afford an upgrade, presumably…
You can link an array of 5 images/gameobjects whatever in a script.
the button can call a function that checks how many upgrades have previously been done.
if there’s space, and you can afford it, it can apply a new colour/sprite to one of your 5 boxes.

Sorry, let me know if that makes any sense? Hard to know where to begin or what to say , etc…