In this video, I will show you how to make a score engine in scratch! The finished project (You can get all the assets here): scratch.mit.edu/projects/6253...
I was struggling to find a tutorial about number counters that actually works, a may have spent too many hours trying to find a good tutorial, but eventually I found this one. So thank you and goodbye.
This is REALLY good, usually when you watch a tutorial you will not know how to connect it to your project, but this is very simple and easy to connect to a project like a clicker or a timer!
hi scratch in minutes, why does my second and third digit number flicker? seems to be a problem at the "delete clone" part, but i can not seem to figure it out. thanks
You can create a new variable and increase its value by 1 every time an enemy is hit. Then simply take the variable and put it in the 'N' input of the 'Show Score' block we made in this video!
scratch.mit.edu/projects/625357139/ This is the link to my score counter project shown in this video. You can click the [See inside] button to see the original script. Try comparing it with your version, or just copy & paste!
You could create a variable such as 'Click Counter' and increase it every time you click the sprite. Then, put the variable in the [Show Score] function shown in this video, and you're all set!
hello, so i know this was like 3 months ago but i noticed that u were asking for ideas for vids to make, so i'll be suggesting an RPG / open world game (p.s. dude ur super underrated keep up the good work bro :D)
Nice tutorial! You are very underrated! But When I have a number >9, the last digit glitches. How do I fix this? Edit: forgot to use run without screen refresh that's why
Now that i watched almost all your videos, you could make more of this, but i recommend pausing more when doing the blocks and explaining a bit of why you have to do it like this, also zoom in the blocks a little bit for a better view of what is the code, aside from this you have a pretty good channel, hope for improvement 👍
Hmm, maybe you can try adjusting the size of your sprite with the [set size to (100) block, and then changing the SBN (Space Between Numbers) input to your liking!
If you've followed the tutorial step-by-step, you should be able to adjust the distance between the numbers and the position by changing the inputs for the [Show Score] function we made!
Try relocating the [broadcast (Delete Score)] block to the main script (when green flag is clicked). And then just use the [Show Score] function whenever you want to show your counter!
You should take the 'Delete Score' broadcast block out of the function and place it before the function block. That way, you can use the function block as many times as you want, with different values and positions each time, after the broadcast block and it will show multiple counters on your screen!
I Followed every step and even rewatched the video but this still did not work (The score board showed up but i did not see the option to change the score)
I'm sorry if my tutorial caused you any trouble. I suggest you take a look at the finished project that I made(the link is in the description) and compare it to your own.
The easiest method would be to use the [Show Score] function twice in the same script with different values and coordinates. Oh, but make sure to move the [broadcast(Delete Score)] block from the [Show Score] function to the main operating script, such as [forever], which contains said function.
I'm guessing something went wrong with the 'change (digit) by (1)' block. Make sure to increase whatever variable you set for the digit index, and you should be good!
Yeah, it's quite a messy bit of code, but I'll do my best to explain. The positioning script places the number sprite on the left of the given center x coordinate (represented by the function variable 'X'). The script has to calculate a position that will make the sprite symmetrically be on the right side of the center X coordinate after it has finished printing. So first, we need the total distance the text sprite will move during the printing. Let's take the number '12345' as an example. Since there are 5 numbers, the sprite needs to move right 4 times, starting as the number '1' and finishing as the number '5'. So the text sprite needs to move [(the length of the number) - 1] times while printing. That makes the total distance [(the space between numbers) * {(the length of the number) - 1}]. Therefore, to make the number positioned at the given coordinate, we need to move the number sprite left by half of that value at the start. And the final script becomes : [(the given starting x coordinate) - 1/2 * ((the space between numbers) * {(the length of the number) - 1})], or [(X) - {(SBN) * {(length of N) - 1} * 1/2}]!
This function shows whatever value that is entered in the 'N', so you can increase the variable that is put in the 'N' section of the function block for the score to go up!
I'm so sorry for the late reply! To answer your question, there are two methods. The first is to stop running the [Show Score] function when you want to hide the counter. Doing so will stop updating the numbers, so you could use the [broadcast (Delete Score)] block to hide the remaining clones. For the second, you could create a variable that stores the show / hide state of the counter. Then take a [when I start as a clone] block, and add [if ] then [show], else [hide] after that. This will allow you to show the numbers when the variable is at the 'show' state and hide them when it's not.
Sorry if my tutorial gave you any trouble. If you want, you can click the link in the description to take the code that I made and use it in your own project.
This is like griffpatch video when he did the number counter, but I think that this is a bit more customizable, great work!
griffpatch = explains for 22 mins
also scratch in minutes = explains in under 5 mins
new sub boi
I was struggling to find a tutorial about number counters that actually works, a may have spent too many hours trying to find a good tutorial, but eventually I found this one. So thank you and goodbye.
This is REALLY good, usually when you watch a tutorial you will not know how to connect it to your project, but this is very simple and easy to connect to a project like a clicker or a timer!
Thanks a TON
I was able to adapt it into my game and the way you explained it made it SO much more simpler
Thank you!!!!!
i think this video was better than griffpatch's video
Same
@TheRaccoonDudeYTYes, griffpatch gives me error.
This is the best tutorial for this because its quick and easy to do.
Great video, out of the 2 other counter scripts I tried first, this is the only one that works exactly how I want it.
Thank you so much!!! this video was better than any other tutorial I found!
Just what i needed man..straight to the point lovely work earned a sub
TYSM! ive been looking for tutorials that work, and i finally found it!
Thanks so much for this tutorial it really helped.
Needed to delete stuff for it to work but still the best out of all of them 7/10
Thanks! This video is helped me realy much!
Thank you so much! this is very helpful!
Greaat video duuudee, helps a lot, this deserves a follow
Nevermind I realized I had it on set x and not change x everything is good now! Thanks a lot!
No problem!
Thank you so much. Worked just like a charm, And your voice is really calming so it helped me relax after a hard day in school, thank you
THANK YOU IT HELPED A LOT
No problem :)
hey um, how do i make letters that actually move with the numbers? and i need to make a shop and stuff with the counter.
Tysm I tried GriffPatch and 3 other tutorials but only this one worked
Great video
you deserve more likes and also i subbed :)
Thank you!! :D
thank you so much!
THX SO MUCH i needed this video im subbing you should have more
TYSM!!!!!! This is so eazy and fast. I will place it in my backpack
Glad I could help!
THANKSSS!!!!! You are better than griffpatch and so underrated!!!
Thanks I really needed this. You earned a sub and a like
THANK YOU SO MUCH!!!!
Edit: When I commented I cant see it, I forgot to put "create clone of (myself)"
No problem :)
hi scratch in minutes, why does my second and third digit number flicker? seems to be a problem at the "delete clone" part, but i can not seem to figure it out. thanks
Are you using the block? If you're using the block instead, it will flicker!
Hey I know this video was ages ago but how do I make it go up every time my bullet hits an enemy
You can create a new variable and increase its value by 1 every time an enemy is hit. Then simply take the variable and put it in the 'N' input of the 'Show Score' block we made in this video!
Hey! i have a problem when ever i try to get the score up or something it shows that score for 0.1 seconds and goes back to 1
How can i fix this?
scratch.mit.edu/projects/625357139/
This is the link to my score counter project shown in this video. You can click the [See inside] button to see the original script. Try comparing it with your version, or just copy & paste!
Thank you
TYSM SOMETHING WORKS FINALLLY
No problem!
it crashed my game… NOW I HAVE TO RESTART ALL OVER AGAIN 🤬
Aww, that's too bad... I'm sorry if my tutorial caused you any trouble 😥
Dude sorry but calm down
Same
@@scratchinminutes9685I’m sorry I raged. I did found a way to make one tho
Without the costumes
Just wondering, let's say I had a different sprite and if I clicked it what do I need to change to make the score increase?
You could create a variable such as 'Click Counter' and increase it every time you click the sprite. Then, put the variable in the [Show Score] function shown in this video, and you're all set!
HELPFUL
TYSM
hello, so i know this was like 3 months ago but i noticed that u were asking for ideas for vids to make, so i'll be suggesting an RPG / open world game
(p.s. dude ur super underrated keep up the good work bro :D)
Ooh, OK! That's an interesting idea, I'll try it!
ur seriously underrated man :D
Thank you!
I was finding this for about. Month this actully works ! thanks so much but now how do I make it if I want it to be in a clicker game?
bro just went straight to the tutorial
How do i hide it at certain points?
Nice tutorial! You are very underrated! But When I have a number >9, the last digit glitches. How do I fix this?
Edit: forgot to use run without screen refresh that's why
Now that i watched almost all your videos, you could make more of this, but i recommend pausing more when doing the blocks and explaining a bit of why you have to do it like this, also zoom in the blocks a little bit for a better view of what is the code, aside from this you have a pretty good channel, hope for improvement 👍
Wow, thanks for the feedback!
@@scratchinminutes9685how do u hide the Score?
hi scratch in minutes, I just wanted to ask how to make the numbers smaller because mine are huge.
Thanks!
Hmm, maybe you can try adjusting the size of your sprite with the [set size to (100) block, and then changing the SBN (Space Between Numbers) input to your liking!
thanks for you
No problem!
Hi! it works well but its lagged. any suggestions?
Hmm, you could try and replace the [create clone of (myself)] block with the [stamp] block... But this will make the numbers a bit blurry.
@@scratchinminutes9685 thanks!
@@TUTOLUQUI No problem!
This is better than griffpatch’s tutorial sorry griffpatch
is there a way to add prefixes like million billion etc...
Hmm, I don't think there is an official scratch function for that sort of thing, but if you want, I think I'll be able to make a tutorial about it!
@@scratchinminutes9685 sure!
Hi! I tried to use this engine on cloud variables but it became laggy. The sprites are always blinkin' and idk why
Oh, I've never tried this on cloud variables... Was it running fine on normal variables?
@@scratchinminutes9685 mine is blinking and i dint even do it on cloud variables
nvm just forgot to run without screen refresh
that is better than griffpatches cool counter
for me the score shows vertically, not horizontally.
Hmm, maybe you placed the positioning script on the Y value of the [go to x ( ) y ( )] block.
😌
How can I make this counter centered to one side and not the middle ?
Interesting question! To do that, you can simply replace the x positioning algorithm with (X), as in the function input!
@@scratchinminutes9685 thanks a lot
@@scratchinminutes9685 Could you please simplify that?
@@chrisepic9800 in the "go to X: Y:" block, put a "x position" in the X: portion of the block intead of the algorithm
@@loko2pontos its not
for some reason the numbers got stuck together, any way to fix this I even re-did the code to match the video and still is happening
It's like as soon as I get to the hundreds they get stuck for some reason
@@BlueberryChannelLol Can you share your project and send me the link?
i need help! when i copied your code and tried it, the second digit number keeps deleting then cloning itself again!
pls help, after i put the score counter script, my game just lags a ton and becomes unplayble
mine is to close together and my number won't move so I can't put in in the place I want it
If you've followed the tutorial step-by-step, you should be able to adjust the distance between the numbers and the position by changing the inputs for the [Show Score] function we made!
@@scratchinminutes9685 okay I will try
You can make a text engine with that
This is great to bad my game can’t be as good
the score is horizontal, how do I fix this?
Maybe you placed the positioning block in the y section instead of the x section?
How do I hide and show the counter in games?
Try relocating the [broadcast (Delete Score)] block to the main script (when green flag is clicked). And then just use the [Show Score] function whenever you want to show your counter!
흠
How could I make multiple number counters without copying the sprite
You should take the 'Delete Score' broadcast block out of the function and place it before the function block. That way, you can use the function block as many times as you want, with different values and positions each time, after the broadcast block and it will show multiple counters on your screen!
@@scratchinminutes9685 Thanks so much!
I Followed every step and even rewatched the video but this still did not work (The score board showed up but i did not see the option to change the score)
I'm sorry if my tutorial caused you any trouble. I suggest you take a look at the finished project that I made(the link is in the description) and compare it to your own.
Do you know how to make it work for two counters?
The easiest method would be to use the [Show Score] function twice in the same script with different values and coordinates. Oh, but make sure to move the [broadcast(Delete Score)] block from the [Show Score] function to the main operating script, such as [forever], which contains said function.
@@scratchinminutes9685 thanks! Works now!
330th sub, i guess.
my digits keep flickering between 1 and 2 after i get to 2 digits
Hmm, if you can share your project and send me the link, I might be able to help you!
the number won't change, can I get some help, I followed to a T.
I'm so sorry for the late reply! If you still need any help, please reply to this comment.
@@scratchinminutes9685 i scrapped the project.
Help, my text is like when i put 2, the number show 22, when i put 100, the number show 111. help pls!
I'm guessing something went wrong with the 'change (digit) by (1)' block. Make sure to increase whatever variable you set for the digit index, and you should be good!
How do I make the score go up when a certain thing happens in the game?
change number by 1
how do how make go at the top of the sprite **
can someone explain the logic of the SBN math?
Yeah, it's quite a messy bit of code, but I'll do my best to explain.
The positioning script places the number sprite on the left of the given center x coordinate (represented by the function variable 'X'). The script has to calculate a position that will make the sprite symmetrically be on the right side of the center X coordinate after it has finished printing. So first, we need the total distance the text sprite will move during the printing. Let's take the number '12345' as an example. Since there are 5 numbers, the sprite needs to move right 4 times, starting as the number '1' and finishing as the number '5'. So the text sprite needs to move [(the length of the number) - 1] times while printing. That makes the total distance [(the space between numbers) * {(the length of the number) - 1}]. Therefore, to make the number positioned at the given coordinate, we need to move the number sprite left by half of that value at the start. And the final script becomes : [(the given starting x coordinate) - 1/2 * ((the space between numbers) * {(the length of the number) - 1})], or [(X) - {(SBN) * {(length of N) - 1} * 1/2}]!
sooo.... how dose it go up by itself?
This function shows whatever value that is entered in the 'N', so you can increase the variable that is put in the 'N' section of the function block for the score to go up!
You are fast ):
it disappeared after it hit 7 help
my numbers are on top of each other.
how do I unhide and hide it?
😊
😊
nvm I just used ghost
i did it but my 2 number flashed forever
Is there anyone who can help?
@@ketinushki Was it only the number two that was flashing, or was there a problem with the display in general?
idk?
@@ketinushki I suggest checking if the 'run without screen refresh' option is enabled in the [Show Score] function!
my last digit is flashing very fast
Anyone knows how to hide and show the numbers?
I'm so sorry for the late reply! To answer your question, there are two methods. The first is to stop running the [Show Score] function when you want to hide the counter. Doing so will stop updating the numbers, so you could use the [broadcast (Delete Score)] block to hide the remaining clones. For the second, you could create a variable that stores the show / hide state of the counter. Then take a [when I start as a clone] block, and add [if ] then [show], else [hide] after that. This will allow you to show the numbers when the variable is at the 'show' state and hide them when it's not.
Sorry for late but thank you!!@@scratchinminutes9685
nice but the number does not look like the same so you need to fix it
Oh, what do you mean by the numbers not looking the same?
that's your fault not his
@@scratchinminutes9685 im working on it but it keeps deleting the number so it looks weird
@@Power-FN Did you check the 'run without screen refresh' option in the 'Show Score' block?
my score is flashing help
Maybe you forgot to check the [run without screen refresh] option on the [show score] function!
not worked for me :(
My numbers glitch in eachother
I don't work for me :l
I'm sorry if my tutorial caused you any trouble. Could you please tell me more specifically what went wrong?
I can make one that has a limit
If you want to know how you can set a limit for your variable, add [if (limit)>], [set (variable) to (limit)]!
SO FAST AND EZ
hmmmm i dont think so that is real becous i tried it and the numbers are like a 1 digt
Sorry if my tutorial gave you any trouble. If you want, you can click the link in the description to take the code that I made and use it in your own project.
Sorry nvm it’s ok know
this dont work it shows 99 when it supposed to be 0
why not works?
Did not work for me
lma
didn't work, i didn't miss anything...
i'm sorry if im being rude.. :(
Maybe you should check if all the costumes are in order...? I'm not exactly sure what went wrong with your script, sorry!
Sorry lma