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

#1 2009-05-21 15:50:41

kgordon
Scratcher
Registered: 2009-02-26
Posts: 100+

Ever wanted an 'if touching color, bounce' block?

This is the best if touching color bounce block I could create, feel free to use it in your projects, the ball never bounces the wrong way. http://scratch.mit.edu/projects/kgordon/536763

Offline

 

#2 2009-05-21 15:54:58

fruit
Scratcher
Registered: 2009-04-24
Posts: 1000+

Re: Ever wanted an 'if touching color, bounce' block?

or,
<when green flag clicked>
<forever>
(insert move technique here)
<if><< <touching color[ whatever
<if on edge, bounce>


@savi3000 | hcsmp.com

Offline

 

#3 2009-05-21 16:07:07

kgordon
Scratcher
Registered: 2009-02-26
Posts: 100+

Re: Ever wanted an 'if touching color, bounce' block?

fruit wrote:

or,
<when green flag clicked>
<forever>
(insert move technique here)
<if><< <touching color[ whatever
<if on edge, bounce>

Actually that would just tell it to wait until it was touching the color and then check to see if it was on the edge and bounce. If on edge bounce only makes the sprite bounce off the edge, sorry. I wouldn't have made this if that worked. Sorry to shoot down your idea.

Also that wouldn't work if you were using x and y velocities as if on edge bounce is just for direction.

Last edited by kgordon (2009-05-24 14:33:32)

Offline

 

Board footer