Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Number Counter for a Clicker Game
- mkahlua
-
37 posts
Number Counter for a Clicker Game
Hello! I'm trying to code a clicker game and I am expecting some pretty large numbers. However, to make those numbers more manageable and appealing to the player, I want to code the number counter so that after the player exceeds 1 million, the number drops down to 1 and shows the word “million”. Then after reaching 1,200,000 the score shows 1.2 million and so on and so forth. I want this for billion, and trillion, and so on as well. If anyone is able to help me with that with just a simple example, that would be great and thank you so much!!
On a slight side note, I also have a game that starts out in cents, but I want the same thing to happen once the player reaches dollars, but of course the sign will need to change and move to the front of the score. Then, from then on I want the score to continue in dollars and then reach millions, billions, trillions and so on again. This is optional and this is not as important to me then the first question I had, so if you're able to help me with this also, great and thank you so much!
Thank you again if you are able to solve my problem!![](//cdn.scratch.mit.edu/scratchr2/static/__74e70580e9dbe93ce1c3f8422dde592d__/djangobb_forum/img/smilies/big_smile.png)
My browser / operating system: MacOS Macintosh X 10.15.7, Chrome 122.0.0.0, No Flash version detected
On a slight side note, I also have a game that starts out in cents, but I want the same thing to happen once the player reaches dollars, but of course the sign will need to change and move to the front of the score. Then, from then on I want the score to continue in dollars and then reach millions, billions, trillions and so on again. This is optional and this is not as important to me then the first question I had, so if you're able to help me with this also, great and thank you so much!
Thank you again if you are able to solve my problem!
![](http://cdn.scratch.mit.edu/scratchr2/static/__74e70580e9dbe93ce1c3f8422dde592d__/djangobb_forum/img/smilies/big_smile.png)
My browser / operating system: MacOS Macintosh X 10.15.7, Chrome 122.0.0.0, No Flash version detected
- Wolf_Link21
-
100+ posts
Number Counter for a Clicker Game
https://scratch.mit.edu/projects/989435992/ here you go, you can extent tie if statements for even bigger numbers
This is dave
:D :: hat :: motionHe protects my from evil kumquats.
Please follow me if you find my response helpful and give me any ideas for my game https://scratch.mit.edu/projects/992371983/
- --CHA0S--
-
100+ posts
Number Counter for a Clicker Game
Take a look at @griffpatch’s number counter tutorial. The link to the studio is https://scratch.mit.edu/studios/30805602/
If the scores get too large you can add
If the scores get too large you can add
if <(score) > [(number)]> thenThe number and smaller size inputs you would need to adjust to fit the screen
set size to (smaller size ) %
end
Hi
![](http://cdn.scratch.mit.edu/scratchr2/static/__9c6d3f90ec5f8ace6d3e8ea1e684b778__/djangobb_forum/img/smilies/big_smile.png)
Trying to become a forum helper
- Discussion Forums
- » Help with Scripts
-
» Number Counter for a Clicker Game