Discuss Scratch

Cw241
Scratcher
13 posts

Flappy bird score

I have a working on a flappy bird game and want to have the score show on the sprite called “numbers” (link below), but I am struggling to do this. Can someone pls help me with this?
Link: https://scratch.mit.edu/projects/1098139627
NoUsername-King
Scratcher
100+ posts

Flappy bird score

For only one digit, you can do something like this:

switch costume to (letter (1) of (Score))

because of the way your costumes were ordered, you can just set the costume to a number and it will get the number in that spot..
If you want more digits, the simplest option is to have a new sprite with letter two instead. Otherwise, you can have more clones to the right of the first number.
You can do something likes this for multiple digits:

when green flag clicked
set [Digit v] to [1]
repeat (2)
create clone of [myself v]
change [Digit v] by (1)
change x by (30)
end
forever
switch costume to (letter (Digit) of (Score))
end
When I start as a clone
forever
switch costume to (letter (Digit) of (Score))
end
Cw241
Scratcher
13 posts

Flappy bird score

@NoUsername-King thank you

Powered by DjangoBB