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

GML Converting integer score to display appropriate sprite digits?

Amon

Member
I have a sprite with each cell containing a different digit frame.

If I were to convert a string to digits, how could I go about displaying sprites to show the current score?

Example: If my score was 1376, then it would display the sprites for each number accordingly. This should also work if the score goes into negative values.
 

Amon

Member
I'm unclear on how to use this. I have followed the docs but how would this be used when drawing text?
 

TsukaYuriko

☄️
Forum Staff
Moderator
Like any other font. It lets you convert a sprite into a font, which can then be used as if it was an actual font when drawing text - as in: draw_set_font, draw_text.
 
Top