Discuss Scratch

UltraColing
Scratcher
11 posts

How to make advanced counters with letters in them! I could never find this out!?

I am making a clicker game, and I do not understand, how I can make it so that there are letters, in them. Someone please, show me the way. Here is the project if you want to see It: https://scratch.mit.edu/projects/846288256/
MrKingofScratch
Scratcher
100+ posts

How to make advanced counters with letters in them! I could never find this out!?

Use a text engine such as https://scratch.mit.edu/projects/928930123/

Last edited by kaj (Tomorrow 00:00:00)
100th post!
Wolf_Link21
Scratcher
100+ posts

How to make advanced counters with letters in them! I could never find this out!?

I think I made this for another person too https://scratch.mit.edu/projects/989435992/

This is dave
:D :: hat :: motion
He 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/
MineTurte
Scratcher
500+ posts

How to make advanced counters with letters in them! I could never find this out!?

UltraColing wrote:

I am making a clicker game, and I do not understand, how I can make it so that there are letters, in them. Someone please, show me the way. Here is the project if you want to see It: https://scratch.mit.edu/projects/846288256/
Or just make 9 costumes each with 1 individual number from 0 to 9 and set their costume names to their number and do this:

when green flag clicked
hide
forever
broadcast [ generate number]
end

when I receive [ generate number]
go to x: (0) y: (0) //This determines the starting location
broadcast [ delete clones]
set [ letter] to [0]
repeat (length of (clicks))
change [ letter] by (1)
create clone of [ myself]
change x by (20) //Change this number to whatever fits the text size (you'll have to do some experimentation to figure out the optimal size)

when I receive [ delete clones]
delete this clone

when I start as a clone
show
switch costume to (letter (letter) of (clicks))

Hope this helps!

Last edited by MineTurte (March 25, 2024 23:37:33)


(pronouns are she/her). Advanced Alpha Game Studios Manager. Our website: https://aags2.w3spaces.com
This is JuniperActias. AKA Moth mommy. If I helped you out consider following Juni-Bug (my new account)!




If you found this secret, say uwu
Signature gradients here













Malicondi
Scratcher
1000+ posts

How to make advanced counters with letters in them! I could never find this out!?

MrKingofScratch wrote:

Use a text engine such as https://scratch.mit.edu/projects/928930123/
That isn't what they're asking for. if i read correctly

To make a number counter with letters (1.6k 6.24m 91.4b etc) it's pretty simple and all you have to do is divide the letter by the number, then floor it and add a letter to it, and use another variable to show the number instead of the original variable/number.

Heres the code to do so, d is the number of decimals you want:
define number counter with decimals (d)
if <not<(number) < (1000)>> then // checks if greater than or equal to 1000.
set [counter v] to (join (([floor v] of (((number) / (1000)) * ([10^ v] of (d) ::operators))) / ([10^ v] of (d) ::operators)) [k])
if <(number) > ([10^ v] of (6) ::operators)> then // this just makes it neater, same as 1 million.
set [counter v] to (join (([floor v] of (((number) / (1000000)) * ([10^ v] of (d) ::operators))) / ([10^ v] of (d) ::operators)) [m])
end
if <(number) > ([10^ v] of (9) ::operators)> then
set [counter v] to (join (([floor v] of (((number) / (1000000000)) * ([10^ v] of (d) ::operators))) / ([10^ v] of (d) ::operators)) [b])
and add more if blocks as needed. For example, if you wanted to show this number: 1.42k then you would use the block like this:
number counter with decimals (2) ::custom // returns 1.42k if the number is 142X, where x is a number 0-9.

Hope this helps!

Last edited by Malicondi (March 26, 2024 00:14:32)


post #1000 post #100 i help in the forums post #1 post #500 0 second ninja
I recommend reading jvvg's essay about the scratch team before complaining, as it may change your opinion and provide insight on the topic.

coming soon :)


MineTurte
Scratcher
500+ posts

How to make advanced counters with letters in them! I could never find this out!?

Malicondi wrote:

MrKingofScratch wrote:

Use a text engine such as https://scratch.mit.edu/projects/928930123/
That isn't what they're asking for. if i read correctly

To make a number counter with letters (1.6k 6.24m 91.4b etc) it's pretty simple and all you have to do is divide the letter by the number, then floor it and add a letter to it, and use another variable to show the number instead of the original variable/number.

Heres the code to do so:
define number counter with decimals (d)
if <not<(number) < (1000)>> then // checks if greater than or equal to 1000.
set [counter v] to (join (([floor v] of (((number) / (1000)) * ([10^ v] of (d) ::operators))) / ([10^ v] of (d) ::operators)) [k])
if <(number) > ([10^ v] of (6) ::operators)> then // this just makes it neater, same as 1 million.
set [counter v] to (join (([floor v] of (((number) / (1000000)) * ([10^ v] of (d) ::operators))) / ([10^ v] of (d) ::operators)) [m])
end
if <(number) > ([10^ v] of (9) ::operators)> then
set [counter v] to (join (([floor v] of (((number) / (1000000000)) * ([10^ v] of (d) ::operators))) / ([10^ v] of (d) ::operators)) [b])
and add more if blocks as needed. Hope this helps!
Well that's mainly just the nongraphical bit of it. Still to make a counter without just a plain variable you'd have to use what I made/what every clicker developer made for click counters. Also yes their question is quite confusing as it implies quite a few things, but I'm pretty sure they want a normal number counter. Idk though.

(pronouns are she/her). Advanced Alpha Game Studios Manager. Our website: https://aags2.w3spaces.com
This is JuniperActias. AKA Moth mommy. If I helped you out consider following Juni-Bug (my new account)!




If you found this secret, say uwu
Signature gradients here













MrKingofScratch
Scratcher
100+ posts

How to make advanced counters with letters in them! I could never find this out!?

Malicondi wrote:

That isn't what they're asking for. if i read correctly
Oh mb I guess I should get my eyes checked
my point still stands and a text engine would take it from a counter with letters to a fancy counter (at this point i'm just trying to make myself relevent lol)

Last edited by kaj (Tomorrow 00:00:00)
100th post!
MineTurte
Scratcher
500+ posts

How to make advanced counters with letters in them! I could never find this out!?

MrKingofScratch wrote:

Malicondi wrote:

That isn't what they're asking for. if i read correctly
Oh mb I guess I should get my eyes checked
my point still stands and a text engine would take it from a counter with letters to a fancy counter (at this point i'm just trying to make myself relevent lol)
Pretty sure you and me were correct about the “fancy” counter. I wanna be relevant tho! that's why I made an extremely compact “fancy” counter that took less time to make than another script I made for someone else that was for a topic 10x easier than this and it took 2x as long…

(pronouns are she/her). Advanced Alpha Game Studios Manager. Our website: https://aags2.w3spaces.com
This is JuniperActias. AKA Moth mommy. If I helped you out consider following Juni-Bug (my new account)!




If you found this secret, say uwu
Signature gradients here













UltraColing
Scratcher
11 posts

How to make advanced counters with letters in them! I could never find this out!?

Thanks all for the help, but i have been racking my brain on how do to make it even better! Like the counter in Candy clicker by coltroc. https://scratch.mit.edu/projects/357587400/. Whenever one of his upgrades automate candy, by 10. They dont just skip all the way to there, it just goes by fast like 1,2,3,4…., to 10 in one second! Then 20, and then 30 and so on… You can check how his counter works. like how i am saying. And also, for the letter counter, i would also want it like 100.1k,100.2k, and so on… And also, can I change the letter from m to million, as i can change it from the box where you put your M? Just thinking, about it gives me a headache. Please show me a solution to this.


And thanks for some of the help!!! I will try to use it now!
UltraColing
Scratcher
11 posts

How to make advanced counters with letters in them! I could never find this out!?

Oh wait. I just saw you doing something like1.47k, and all that. Sorry! Just pls look at the other problems!
UltraColing
Scratcher
11 posts

How to make advanced counters with letters in them! I could never find this out!?

is

Last edited by UltraColing (March 26, 2024 22:44:31)

UltraColing
Scratcher
11 posts

How to make advanced counters with letters in them! I could never find this out!?

Also, sometimes it is not centered right for some reason, so could you check my code why this is happening?
UltraColing
Scratcher
11 posts

How to make advanced counters with letters in them! I could never find this out!?

Nevermind, figured it out the centering reason.
UltraColing
Scratcher
11 posts

How to make advanced counters with letters in them! I could never find this out!?

I FINALLY FIGURED IT OUT!
UltraColing
Scratcher
11 posts

How to make advanced counters with letters in them! I could never find this out!?

Eh! It does not work!

Powered by DjangoBB