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

#1 2012-03-08 13:48:38

Benneh
New Scratcher
Registered: 2012-03-02
Posts: 10

Hey, how do I do this..

In my game, there are a few mini games, and when you complete the mini games, the arrows that you clicked on to play them will go green. When you have completed all the mini-games, you get a prize.
However, I dont know how I would make it so when you complete all the mini-games, a sprite would show. please, help and tell me how I would go about doing this

Offline

 

#2 2012-03-08 13:57:49

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: Hey, how do I do this..

Well, each time you complete a minigame, you could add the set a variable ("[game] completed?") to "1" instead of "0" (have it 0 to start), and in the other sprite, have

when gf clicked
hide
wait until <<(game 1 completed?) = [1]> and <<(game 2 completed?) = [1]> and <(game 3 completed?) = [1]>>>
show

Offline

 

#3 2012-03-08 14:06:39

turkey3
Scratcher
Registered: 2011-12-04
Posts: 500+

Re: Hey, how do I do this..

scimonster wrote:

Well, each time you complete a minigame, you could add the set a variable ("[game] completed?") to "1" instead of "0" (have it 0 to start), and in the other sprite, have

when gf clicked
hide
wait until <<(game 1 completed?) = [1]> and <<(game 2 completed?) = [1]> and <(game 3 completed?) = [1]>>>
show

Yep

Offline

 

#4 2012-03-08 14:10:04

Benneh
New Scratcher
Registered: 2012-03-02
Posts: 10

Re: Hey, how do I do this..

one more question, how can i make it so when you've completed a mini-game, you can no longer play it? i mean, its causing a lot of bugs thank you so much!

Offline

 

#5 2012-03-08 14:14:56

Benneh
New Scratcher
Registered: 2012-03-02
Posts: 10

Re: Hey, how do I do this..

oh ^ for the above, i forgot to mention i dont want to hide the sprite, i want it to visible, but unclickable. thanks (:

Offline

 

#6 2012-03-08 14:18:35

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: Hey, how do I do this..

Benneh wrote:

one more question, how can i make it so when you've completed a mini-game, you can no longer play it? i mean, its causing a lot of bugs thank you so much!

Check if its "played" variable is 1, and if it is, don't let you play it.  smile

And about your other thing, do you have scripts for making it unclickable already? I don't really get what you mean by that anyways.  hmm

Offline

 

#7 2012-03-08 14:21:45

Benneh
New Scratcher
Registered: 2012-03-02
Posts: 10

Re: Hey, how do I do this..

sorry, didn't explain that well.
basically, when i play my game for the first time, then complete it, i want to make it so you cannot click on it again and replay the minigame unless you restart the actual game. this is because i'm recieving a couple of bugs through replaying the minigame without reloading the game.
so, what i'm asking is how to disable the option for it to change background and stuff when the minigame has already been completed
i hope this makes sense  smile

Offline

 

#8 2012-03-08 14:35:12

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: Hey, how do I do this..

I'm assuming you have a sprite for each minigame option. When that sprite is clicked, I assume it broadcasts something like "play [game1]". Instead, do this:

when [game1 choice] clicked
if <(game1 played?) = [0]>
broadcast [play game1 v] 

Last edited by scimonster (2012-03-08 14:35:28)

Offline

 

#9 2012-03-08 17:55:15

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

Re: Hey, how do I do this..

turkey3 wrote:

scimonster wrote:

Well, each time you complete a minigame, you could add the set a variable ("[game] completed?") to "1" instead of "0" (have it 0 to start), and in the other sprite, have

when gf clicked
hide
wait until <<(game 1 completed?) = [1]> and <<(game 2 completed?) = [1]> and <(game 3 completed?) = [1]>>>
show

Yep

And that's helpful... How?

I thought the new post count layout was meant to stop pointless posts like these -.-


Why

Offline

 

Board footer