Discuss Scratch

UnsungCress
Scratcher
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:
when I start as a clone
forever
set [pipe x position v] to (x position)
end
(note: not the actual script)
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
Scratcher
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
Scratcher
1000+ posts

Need help with finding x positions of flappy bird pipes

Good idea
UnsungCress
Scratcher
28 posts

Need help with finding x positions of flappy bird pipes

good idea thank you
deck26
Scratcher
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.

Powered by DjangoBB