Adding a score function with images

Here i am :slight_smile:

I would like to display a function which can display a scoring module using images. I’ve tried something like that : 1. using an image png for each number (0.png, 1.png … 9.png)

  1. loading at the start of my scene, 00000 … That means, five images of 0.png

  2. each time my player gains coins (5 points per coin) the function score makes the changement as : (score_0, score_5, etc… are images)

    mydata.score = mydata.score + 5 scoreText.text = mydata.score if mydata.score == 5 then score_5.isVisible=true score_5.x=score_title.x+score_title.width+135 end if mydata.score == 10 then score_5.isVisible=false score_1.isVisible=true score_1.x=score_title.x+score_title.width+108 score_0.isVisible=true score_0.x=score_title.x+score_title.width+135 end if mydata.score == 15 then score_5.isVisible=false score_1.isVisible=true score_1.x=score_title.x+score_title.width+108 score_0.isVisible=true score_0.x=score_title.x+score_title.width+135 end

As you can see, it could be very difficult for me to make this for an unlimited numbers :(  Do you think it could be more easy to load spreadsheet ? What about the score calcutation, can be simplified ?

Thank you in advance :slight_smile: