• 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!

Windows Add a variable to some text in GM 8.0 using code?

9

9th_core

Guest
The title says it all. I want to make some text that will have a variable at the end, like this:
Secrets found: 0
and if you collect a secret...
Secrets found: 1
(add 1 to the counter)
Any help is appreciated! :)
 

FrostyCat

Redemption Seeker
Use +. If it is a numeric value, add string().
Code:
draw_text(x, y, "Secrets found: " + string(global.secrets));
 
Top