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

#1 2008-04-15 08:14:03

Woodsy305
Scratcher
Registered: 2008-04-13
Posts: 2

Click Ten Times....

I need help!

I am currently working on a game that will end up being awesome. But I have run into some trouble. Can someone please tell me a way to have a sprite be clicked 10 times, separately, then display a new background. Any help will be much appreciated.

Thanking you in advance.

Woodsy305

Offline

 

#2 2008-04-15 08:43:04

ihaveamac
Scratcher
Registered: 2007-09-22
Posts: 1000+

Re: Click Ten Times....

<when[ sprite name here ]clicked>
<if><( <{ variable  }> <=> 10 )>
<broadcast[ clicked 10 times
<else>
<change{ variable  }by( 1
<end>


~ihaveamac - visit ihaveamac.net

Offline

 

#3 2008-04-15 08:43:08

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: Click Ten Times....

On the sprite that is going to be clicked, define a variable called "Clicks" and set it to zero on a Green Flag hat. 

On the sprite that is going to be clicked, set up a When Clicked hat and under it put a "Change Clicks by 1" block.  Under that, set up an "IF" block that tests to see if Clicks is greater than 9.  If it is, Broadcast a message called "Change Background". 

On the stage, set up a "When I Recieve Change Background" hat and under that put a "Next Background" block.

That should do it!


http://i39.tinypic.com/2nav6o7.gif

Offline

 

#4 2008-04-15 08:44:41

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: Click Ten Times....

ihaveamac - you beat me to the post by 4 seconds!


http://i39.tinypic.com/2nav6o7.gif

Offline

 

#5 2008-04-15 08:46:25

ihaveamac
Scratcher
Registered: 2007-09-22
Posts: 1000+

Re: Click Ten Times....

Paddle2See wrote:

ihaveamac - you beat me to the post by 4 seconds!

LOL I did?


~ihaveamac - visit ihaveamac.net

Offline

 

#6 2008-04-16 04:13:14

Woodsy305
Scratcher
Registered: 2008-04-13
Posts: 2

Re: Click Ten Times....

Thanks Guys.

Offline

 

Board footer