Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » How do end a game when the score = x
- jwsprof
-
2 posts
How do end a game when the score = x
I cannot get this simple Chase Game to end.
Please see Chase Game.
Green flag
If score = 50
End all
All script in a Forever block
Please see Chase Game.
when green flag clicked
<[] = []>
stop [ v]
Green flag
If score = 50
End all
All script in a Forever block
- Techno-CAT
-
1000+ posts
How do end a game when the score = x
Hello
It seems you've typed your variable name into the () = () operator block.

What you'll need to do is go to the “Variables” tab in the editor, and drag the “score” variable into the green block.

Now your project should work.
Other uses of this block are documented in the wiki.
Hope this helps.
It seems you've typed your variable name into the () = () operator block.

What you'll need to do is go to the “Variables” tab in the editor, and drag the “score” variable into the green block.

Now your project should work.
Other uses of this block are documented in the wiki.
Hope this helps.
Last edited by Techno-CAT (June 6, 2020 12:26:10)
- Oumuamua
-
1000+ posts
How do end a game when the score = x
when green flag clicked
set [score v] to [0]
wait until <(score) > [49]>
broadcast [end of game v]
when I receive [end of game v]
... ::grey
- ScratchLetters2020
-
100+ posts
How do end a game when the score = x
You can also do this:
Hope that helped!
when green flag clicked
set [Score v] to [0]
broadcast [start game v]
if <<(Score) = (50)> or <(Score) > (50)>> then
broadcast [end game v]
stop [all v]
Hope that helped!

Last edited by ScratchLetters2020 (June 6, 2020 16:29:37)
- lucasd6112
-
1 post
How do end a game when the score = x
There is a new version so how do you do it with the new version?
- medians
-
1000+ posts
How do end a game when the score = x
This was necroposted on.THE SAME There is a new version so how do you do it with the new version?
- adenpboiii
-
1 post
How do end a game when the score = x
??? WHICH ONE!!!!'!!!!!!!!!!!!!!!!
:0


- Discussion Forums
- » Help with Scripts
-
» How do end a game when the score = x