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

#1 2011-03-31 12:44:47

BananaGirl11
New Scratcher
Registered: 2011-03-31
Posts: 2

I need this ball to bounce of a certain colour.

How do I get a sprite when it touches a certain colour to bounce off it??

Offline

 

#2 2011-03-31 15:58:00

GurkinC
Scratcher
Registered: 2009-11-30
Posts: 100+

Re: I need this ball to bounce of a certain colour.

What movement scripts are you using?


Try my latest game, Rolling 2, a 10-level platform game based around the gravity marble.

Offline

 

#3 2011-03-31 19:21:00

Kileymeister
Scratcher
Registered: 2008-04-17
Posts: 1000+

Re: I need this ball to bounce of a certain colour.

This is a slightly complex but extremely accurate method of doing it:

Make the ball have a separate costume with a certain color on it's left and right and a certain color on it's top and bottom. Make everything else black or some other color.
Like this:http://i56.tinypic.com/2u619ap.gif
(Note:  Make the size of this costume the same as the size of your ball)
Now put a script like this in your movement script for the ball:
http://i54.tinypic.com/sfx8ao.gif
(Note:  This must be put into your movement script, or at least into a forever loop).
(Second note: The 'switch to costume "normal"' block switches the costume to the ball's regular costume, so it looks normal.  Make "normal" the name of the ball's regular costume)

Last edited by Kileymeister (2011-03-31 19:23:53)


I'm back, and showcasing two new* projects!  Click left or right on the image below to see!
http://img109.imageshack.us/img109/7905/part1l.pnghttp://img859.imageshack.us/img859/6417/part2bf.png

Offline

 

Board footer