Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Flappy bird point add
- larenzlikescreating
-
Scratcher
2 posts
Flappy bird point add
How to make the score script of flappy bird in scratch when the bird goes past the pipe without getting hit
- NeonG4
-
Scratcher
1000+ posts
Flappy bird point add
How to make the score script of flappy bird in scratch when the bird goes past the pipe without getting hitWell, when the pipe x position is less than the bird x pos, you can set the variable alreadyscored from 0 to one, and change the score by one.
When I start as pipe:
set alreadyscored to 0
forever:
if xpos < bird_xpos and alreadyscored == 0:
score += 1
alreadyscored = 0
set [alreadyscored v] to [1]
forever
if <<(x position) < ([x position v] of [bird v])> and <(alreadyscored) = [0]>> then
set [alreadyscored v] to [1]
change [score v] by (1)
end
end
I hope this helps.
- Discussion Forums
- » Help with Scripts
-
» Flappy bird point add

