I want to display my score using images of numbers, not text. By using my own images, I can make the numbers that make up the score look pretty and more complex. So a score of 8547 would be displayed by 8.png, 5.png, 4.png, 7.png.
I figure a system like this could work:
load image "0.png",1
load image "1.png",2
load image "2.png",3
etc.
score = 172
some function to separate the digits
d1 = 2, the first digit somehow separated
d2 = 7, the second
d3 = 1, the third
d4 = 0, the fourth
d5 = 0, the fifth
sprite #,x,y,d5+1
sprite #,x,y,d4+1
sprite #,x,y,d3+1
sprite #,x,y,d2+1
sprite #,x,y,d1+1
Basically, a working idea, except I have no clue how to extract the digits. Anyone know how to extract the individual digits from a number?