Discuss Scratch

jwsprof
Teacher
2 posts

How do end a game when the score = x

I cannot get this simple Chase Game to end.

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
Scratcher
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.

Last edited by Techno-CAT (June 6, 2020 12:26:10)

Oumuamua
Scratcher
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
jwsprof
Teacher
2 posts

How do end a game when the score = x

THANKS TO ALL!!!!! JWS
ScratchLetters2020
Scratcher
100+ posts

How do end a game when the score = x

You can also do this:

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
Scratcher
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
Scratcher
1000+ posts

How do end a game when the score = x

Crow_Boy08 wrote:

lucasd6112 wrote:

There is a new version so how do you do it with the new version?
THE SAME
This was necroposted on.
adenpboiii
New Scratcher
1 post

How do end a game when the score = x

??? WHICH ONE!!!!'!!!!!!!!!!!!!!!! :0

Powered by DjangoBB