Discuss Scratch

EpicCreator9132
Scratcher
9 posts

Help! How to make a number sprite counter?

Can someone please help? I'm trying to make a clicker game and I have a variable for “money”. I want to display the variable using sprites, if you know what I mean. I want it so that the money isn't displayed as a variable but with digits made from sprites to make it look nicer. I've seen this type of thing done in other projects but, after looking inside of them, I can't figure out the pieces of script used to do this. If anyone knows how to do this, I would appreciate some help. Thanks.
deck26
Scratcher
1000+ posts

Help! How to make a number sprite counter?

https://scratch.mit.edu/projects/43934978/

Can be done with clones or stamping. If using clones create them and hide/display as required rather than constantly recreating.
scienceexplorer1
Scratcher
100+ posts

Help! How to make a number sprite counter?

Yes.

Steps
1.Get all costumes for 1 - 10 in whatever style you want
2.Name the costumes to their corresponding number
3.Use this script
define Draw text (txt)
repeat (length of (txt))
change [letter counter v] by (1)
switch costume to (letter (letter counter) of (txt))
stamp
move (12) steps
end
This script only works for numbers unless you add costumes for each letter/symbol/character with corresponding costume names
Use
erase all
\
block to delete all the pen so you can update the text without it overlapping
Note : This script has a delay(which looks like typing) to remove the delay right-click the block and check the box which says “run without screen refresh”

Last edited by scienceexplorer1 (Feb. 23, 2021 21:27:32)

EpicCreator9132
Scratcher
9 posts

Help! How to make a number sprite counter?

Those work. Thanks!
-Enoch_Animatez-
Scratcher
6 posts

Help! How to make a number sprite counter?

nice
Quintonchaulklin
Scratcher
4 posts

Help! How to make a number sprite counter?

how does one make a number counter that displays numbers and there acronyms
like 400 mil and 258 k

Powered by DjangoBB