• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Showing upgrade after buying default object

T

Tomkeen

Guest
Hey there, I was looking for code what can help me to show option for upgrade after I buy specific object. For example like idle games - you buy something what increase your passive income and after you buy it, upgrade icon appears. I don't understand draw that much even I read stuff about it. I'm not even sure, if I really need draw event for this to solve.
 

Rob

Member
Don't copy/paste this, this is just to give you an idea:

Code:
//draw your normal sprite

if (bought) draw upgrade sprite
bought is just a boolean (it'll be either true or false). You would have it set to false initially, and then when the player buys something you set "bought" to true. You can use the same boolean for other things too - try to have as few as possible.
 
T

Tomkeen

Guest
Yes yes, thank you so much. I wasn't thinking like true/fals there. It works, so thanks once again!
 
Top