Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Need help with finding x positions of flappy bird pipes
- UnsungCress
-
28 posts
Need help with finding x positions of flappy bird pipes
I'm making a flappy bird project. I need to know the X positions of seperate pipes so that I know when to score, and nothing I've tried works. The pipes are clones. I've tried to do this:
but this doesn't work, because when a new pipe is created, it takes over the variable before the first pipe can even reach the bird.
Please help!
when I start as a clone(note: not the actual script)
forever
set [pipe x position v] to (x position)
end
but this doesn't work, because when a new pipe is created, it takes over the variable before the first pipe can even reach the bird.
Please help!
- Catscratcher07
-
1000+ posts
Need help with finding x positions of flappy bird pipes
If I know flappy bird, the player remains in a constant x position. Why not have the pipes give a point whenever they reach that x position instead of worrying about tracking their x position in a manner that the player sprite can read?
- Dagriffpatchfan
-
1000+ posts
Need help with finding x positions of flappy bird pipes
Good idea
- UnsungCress
-
28 posts
Need help with finding x positions of flappy bird pipes
good idea thank you
- deck26
-
1000+ posts
Need help with finding x positions of flappy bird pipes
Each clone has its own x position and can be moved independently. I don't see why you'd need a separate variable to store the x position - the cloned pipe can just increase the score as it passes the bird's position.
- Discussion Forums
- » Help with Scripts
-
» Need help with finding x positions of flappy bird pipes