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

#1 2012-03-08 20:58:38

coolhogs
Scratcher
Registered: 2011-07-26
Posts: 1000+

turning in pong

How do I make a ball bounce in pong?


Get ready for domination of:  tongue

Offline

 

#2 2012-03-09 01:30:04

liupengty
Scratcher
Registered: 2009-08-24
Posts: 41

Re: turning in pong

See Scratch------>Open------>Examples---->Games----->4 pong

Offline

 

#3 2012-03-09 16:41:07

coolhogs
Scratcher
Registered: 2011-07-26
Posts: 1000+

Re: turning in pong

Please help me! I am not using the samples by the way.


Get ready for domination of:  tongue

Offline

 

#4 2012-03-09 18:23:33

PullJosh
Scratcher
Registered: 2011-08-01
Posts: 500+

Re: turning in pong

If it has to bounce on an y axis (like this) then you need to use this script:

point in direction ((360) - (direction))
If it is on an x axis (like this) you have to use this script:
point in direction ((180) - (direction))
I hope that helped!

Last edited by PullJosh (2012-03-09 18:24:09)


http://www.blocks.scratchr.org/API.php?action=text&string=I'm_on_vacation!&xpos=155&ypos=90&font_size=30&bgimage=http://imageshack.us/a/img339/7215/sspeechsigapiforwords.png

Offline

 

#5 2012-03-09 18:29:13

RedRocker227
Scratcher
Registered: 2011-10-26
Posts: 1000+

Re: turning in pong

PullJosh wrote:

If it has to bounce on an y axis (like this) then you need to use this script:

point in direction ((360) - (direction))
If it is on an x axis (like this) you have to use this script:
point in direction ((180) - (direction))
I hope that helped!

Actually, the first one should be;

point in direction ((direction)*[-1])
smile

EDIT: Wait actually your one might work as well. I've never seen it used before but I think it may work as well.

Last edited by RedRocker227 (2012-03-09 18:30:06)


Why

Offline

 

Board footer