How do you make the Glide "x" and the "y" formated correctly to make a sprite go right to left?
<glide( 1 )secs to x
? )y
?)
Last edited by theapproom (2009-11-25 11:06:56)
Offline
Well, it will go right to left if the X coordinate in the block is less than the sprite's. What exactly do you need it for? I can help you more if you be more specific.
Offline
I have a sprite that I need to go from left to right bouncing off the edge like pong but I want to have this happen forever
Offline
The edge I'm talking about is sort of like a paddle on the right and left side of the screen.
Offline
If you want to make a game like pong, you do not want to use the glide block. Instead use the <move( )steps> block. With this you could say something like this.
<when green flag clicked>
<forever>
<move( 3 )steps>
<turn cw( <pick random( 1 )to( 3)degrees>
<if><touching[ edge
<point in direction( (( <direction> <-> 180 ))
But if you insist on using the glide block you would say:
<when green flag clicked>
<go to x
0 )y
0
<forever>
<glide( 1 )secs to x
-200 (or something like that) )y
0
<glide( 1 )secs to x
200 (or something like that) )y
0
Offline
Okay, thank you very much. It worked great and I'm one step ahead of finishing my project, thanks
Offline
Your welcome!
Offline