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

#1 2009-03-05 14:13:58

2005GreenhillA
Scratcher
Registered: 2009-03-05
Posts: 1

Pong-Help!!

i am trying to make a simple pong game where if you miss, you lose. I am trying to find a way of making the sprite hit the paddle so it bounces off. when i do it it just gets stuck on the paddle vibrating.
Please help!!!!!!!!!!

Offline

 

#2 2009-03-05 16:50:01

daydreamgirl
Scratcher
Registered: 2009-02-20
Posts: 42

Re: Pong-Help!!

I had trouble with this. Here is what I would do.

<blocks>
<when green flag clicked>
<forever if> <touching[paddle]
<point in direction(((180<-><direction>  ))
<move(5  )steps>
</blocks>

The point in direction blocks make the ball bounce.
The move 5 steps stops it from getting stuck on the paddle.


Test Signature

Offline

 

#3 2009-03-05 19:23:53

bosox397
Scratcher
Registered: 2008-02-17
Posts: 1000+

Re: Pong-Help!!

also, u need to add this block:

<if on edge, bounce>


Dear Scratch Users,
I'm done with scratch, or at least making projects. I have made one last big game, thats both fun and teaches a lesson about water. It'd mean a lot if you gave me feedback.                              http://scratch.mit.edu/projects/bosox397/569201

Offline

 

#4 2009-03-06 12:41:15

yambanshee
Scratcher
Registered: 2007-11-06
Posts: 500+

Re: Pong-Help!!

daydreamgirl wrote:

I had trouble with this. Here is what I would do.

<blocks>
<when green flag clicked>
<forever if> <touching[paddle]
<point in direction(((180<-><direction>  ))
<move(5  )steps>
</blocks>

The point in direction blocks make the ball bounce.
The move 5 steps stops it from getting stuck on the paddle.

Not so simple. It depends where the paddle is located. Use this project to help you: http://scratch.mit.edu/projects/yambanshee/371970/download

Offline

 

Board footer