Discuss Scratch

mkahlua
Scratcher
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!



My browser / operating system: MacOS Macintosh X 10.15.7, Chrome 122.0.0.0, No Flash version detected
Wolf_Link21
Scratcher
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
--CHA0S--
Scratcher
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
ifscore>(number)thensetsizetosmallersize%
The number and smaller size inputs you would need to adjust to fit the screen

Powered by DjangoBB