This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2009-11-25 11:06:13

theapproom
Scratcher
Registered: 2009-08-24
Posts: 38

I NEED HELP on the glide feature

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 sad  ? )y sad ?)

Last edited by theapproom (2009-11-25 11:06:56)

Offline

 

#2 2009-11-25 11:14:17

shadow_7283
Scratcher
Registered: 2007-11-07
Posts: 1000+

Re: I NEED HELP on the glide feature

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

 

#3 2009-11-25 11:17:39

theapproom
Scratcher
Registered: 2009-08-24
Posts: 38

Re: I NEED HELP on the glide feature

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

 

#4 2009-11-25 11:20:22

theapproom
Scratcher
Registered: 2009-08-24
Posts: 38

Re: I NEED HELP on the glide feature

The edge I'm talking about is sort of  like a paddle on the right and left side of the screen.

Offline

 

#5 2009-11-25 11:23:08

shadow_7283
Scratcher
Registered: 2007-11-07
Posts: 1000+

Re: I NEED HELP on the glide feature

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 sad  0 )y sad 0
<forever>
<glide( 1 )secs to x sad  -200 (or something like that) )y sad  0
<glide( 1 )secs to x sad  200 (or something like that) )y sad  0

Offline

 

#6 2009-11-25 11:26:45

theapproom
Scratcher
Registered: 2009-08-24
Posts: 38

Re: I NEED HELP on the glide feature

Okay, thank you very much. It worked great and I'm one step ahead of finishing my project, thanks  smile

Offline

 

#7 2009-11-25 11:47:33

shadow_7283
Scratcher
Registered: 2007-11-07
Posts: 1000+

Re: I NEED HELP on the glide feature

Your welcome!

Offline

 

Board footer