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

#1 2013-04-23 15:45:49

djtirex
New Scratcher
Registered: 2013-04-23
Posts: 2

If score = 3 hide?

Ok, so I've made this maze, and each time the character picks up a cookie, the score goes up. The maximum score is 4, and I want so when all the cookies have been taken, a sprite that blocks the exit opens.

Any ideas?

this is my code already on the sprite thats blocking the exit


when gf clicked

if <(score) = [4]> 

hide

end

Offline

 

#2 2013-04-23 15:49:27

joshuaho
Scratcher
Registered: 2012-08-20
Posts: 100+

Re: If score = 3 hide?

djtirex wrote:

Ok, so I've made this maze, and each time the character picks up a cookie, the score goes up. The maximum score is 4, and I want so when all the cookies have been taken, a sprite that blocks the exit opens.

Any ideas?

this is my code already on the sprite thats blocking the exit


when gf clicked

if <(score) = [4]> 

hide

end

Um, I think that this belongs in project ideas.


Did you know that you can go to space and see Mars by clicking here?

Offline

 

#3 2013-04-23 16:13:15

djtirex
New Scratcher
Registered: 2013-04-23
Posts: 2

Re: If score = 3 hide?

no because I need help with the script?

Offline

 

#4 2013-04-23 16:17:48

Tohmis
Scratcher
Registered: 2013-02-18
Posts: 58

Re: If score = 3 hide?

Maybe like this?

When gf clicked
hide
wait until <(score)=[4]>
show
hope it helps  smile


Check out my new game
http://scratch.mit.edu/static/projects/Tohmis/3300878_sm.png

Offline

 

#5 2013-04-23 16:19:40

EH7meow
Scratcher
Registered: 2013-03-23
Posts: 24

Re: If score = 3 hide?

Perhaps you should make it:

when gf clicked
forever
if <(score)=[4]>
hide
Hope this helps.  smile


Love lovehearts? Love mending lovehearts? Then you'll love Love Doctor

Offline

 

#6 2013-04-24 19:28:37

laptop97
Scratcher
Registered: 2011-06-27
Posts: 1000+

Re: If score = 3 hide?

Tohmis wrote:

Maybe like this?

When gf clicked
hide
wait until <(score)=[4]>
show
hope it helps  smile

You had the hide and show mixed up  tongue

When gf clicked
show
wait until <(score)=[4]>
hide
Either this or the above example would work  smile

Offline

 

Board footer