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

#1 2011-03-11 20:53:22

XxXbobXxX
Scratcher
Registered: 2011-02-10
Posts: 50

Can anyone help me?

hey guys i am making a pong project and i need help, I want it to be like when the ball hits the paddle it speed changes but i dont know what to do please help!!!!!!!!!


XxXbobXxX
                                    Barry bright

Offline

 

#2 2011-03-11 21:01:09

silvershine
Scratcher
Registered: 2010-11-21
Posts: 500+

Re: Can anyone help me?

Try making a variable called speed, and use a script like this:
[blocks]<when green flag clicked>
<set{ speed }to( 10
<forever>
<move( <{ speed }> )steps>
[/blocks]

Then make a script for when the ball hits the paddle:
[blocks]
<when green flag clicked>
<forever if><touching[ PaddleSprite
<set{ speed }to( 5
[/blocks]

That last script would slow down the ball. If you would like it to speed the ball up, have it set the speed variable to something like 15.

Hope that helps,

Silvershine

Offline

 

Board footer