I have made a game and wondered if the was a good way to show a score other than creating a variable. Thanks :-)
Offline
You can create a sprite with different costumes representing each number on the scoreboard. You may have to use different sprites for thousands, hundreds, tens, and ones. Make a variable that has the score, but based on that score, display the correct costume that corresponds with that score. That way, you don't have to display the variable, but you can still show your score, in a nice way. Also, be sure to make your scoreboard look stylish!
Hope this helped!
Offline
^that
have costumes 0-9, then use this script (this is the 1 sprite version"
when gf clicked forever clear go to x:(position of thousands) y:(position of scoreboard) switch to costume ((letter (1) of (score)) +(1))//+1 so 0 becomes costume 1 stamp go to x:(position of hundreds) y:(position of scoreboard) switch to costume ((letter (2) of (score)) + (1)) stamp go to x:(position of tens) y:(position of scoreboard) switch to costume ((letter (3) of (score)) +(1)) stamp go to x:(position of units) y:(position of scoreboard) switch to costume ((letter (4) of (score)) + (1))
Offline
It doesn't work if there is no 1000s!! HELP!
Offline
You just have to add leading 0's if the score doesn't contain them. Add this at the beginning of that script (provided that the score will have 4 digits).
set [DisplayScore v] to (score) if <(length of [score v]) = (1)> set [DisplayScore v] to (join [000] (score)) end if <(length of [score v]) = (2)> set [DisplayScore v] to (join [00] (score)) end if <(length of [score v]) = (3)> set [DisplayScore v] to (join [0] (score)) endThen, change the script for drawing/stamping to choose letter (_) of (DisplayScore), not (score). That should do it.
Last edited by amcerbu (2012-09-15 13:30:05)
Offline