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

#1 2012-01-25 21:21:15

daddyville
New Scratcher
Registered: 2012-01-25
Posts: 1

Very simple question

Hello! First post...

My son in tinkering with Scratch and has built a simple program where a ball hits a cat. He has the ball changing it's costume when the sprites contact but the he added that he wants the cat to disappear.

So, contact equals ball changing color and cat disappearing. But the second sprite (cat) script won't run. Ball hits cat, ball changes color but cat doesn't disappear.

So my question is, what do we have to do to make both scripts run? Here is the second script on sprite 2's page.

[blocks]
<when green flag clicked>
<if><touching[ sprite 1
<next costume>
[/blocks]

Any help would be appreciated.

Offline

 

#2 2012-01-25 22:05:14

MoreGamesNow
Scratcher
Registered: 2009-10-12
Posts: 1000+

Re: Very simple question

The problem is that it only checks to see if it is touching the bat once (directly after the green flag is clicked.  Try this:

<when green flag clicked>
<wait until><touching[ sprite 1]>
<next costume>


http://images2.layoutsparks.com/1/218929/rubiks-cube-animated-rotating.gif
"Cogito ergo sum" --  I think, therefore I am

Offline

 

#3 2012-01-25 22:23:05

slayerrobe7
Scratcher
Registered: 2011-06-24
Posts: 500+

Re: Very simple question

your problem is that it is only cheeking if its touching the sprite once you should yyoue either a forever block or the script above


!!!When it comes to Scratch2.0 I am totally like freaking out!!!

Offline

 

#4 2012-01-26 03:28:26

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

Re: Very simple question

Currently, it will only check if it's touching when the project is started. Simply put a "Forever" block around it, and it'll work. Make sure to program it to show when he project is started again though  wink


Why

Offline

 

Board footer