Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » How to make custom counters/variable displays?
- Durpington
-
12 posts
How to make custom counters/variable displays?
I've built a game that looks pretty cool. Only problem is, the score counter contrasts terribly with the art that I've put in. I would like to make my own score counter, but have no idea as to how to go about it. Please help!
https://scratch.mit.edu/projects/77270958/
https://scratch.mit.edu/projects/77270958/
- Border-Collie
-
100+ posts
How to make custom counters/variable displays?
So you want a score and you don't want it to look like a variable? I could try to help.
- Durpington
-
12 posts
How to make custom counters/variable displays?
https://scratch.mit.edu/projects/43934978/ may helpThank you, I think I might borrow this one and tweak it a bit for my needs if you don't mind.
- deck26
-
1000+ posts
How to make custom counters/variable displays?
That's the way Scratch is, you can look inside projects and ‘borrow’ what you need. A credit is always nice when you do so though.https://scratch.mit.edu/projects/43934978/ may helpThank you, I think I might borrow this one and tweak it a bit for my needs if you don't mind.
- Ataxaos
-
500+ posts
How to make custom counters/variable displays?
Assuming your score goes up to three numbers, create three sprites with the costumes 0-9 in styles that you like.
For each sprite, do this:
So when the score is 100, assuming you put the numbers 0-9 in order in a sprite, the costume for the number “1” would be costume #2.
The first sprite will then switch to the costume of the first digit of the variable “Score” (which is 1) +1, which gives costume #2.
For each sprite, do this:
when green flag clickedOf course, replace…
forever
switch costume to ((letter (1) of (Score)) + (1))
end
(letter (1) of (Score))with
(letter (2) of (Score))…for the second digit of the score, etc.
So when the score is 100, assuming you put the numbers 0-9 in order in a sprite, the costume for the number “1” would be costume #2.
The first sprite will then switch to the costume of the first digit of the variable “Score” (which is 1) +1, which gives costume #2.
- deck26
-
1000+ posts
How to make custom counters/variable displays?
Hmm….Let Me See……
Please don't spam or necropost. मैं हिंडियन हूं!
- Discussion Forums
- » Help with Scripts
-
» How to make custom counters/variable displays?