help

id: 750750

category: Help with Scripts

posts: 4

EarvinKeel EarvinKeel loading
I'm trying to make a game where a bee named Buzzer has to hit clouds but a problem is that when clouds = 10 it's supposed to broadcast game over but it's not working. Can anyone help me?
The code:
EarvinKeel EarvinKeel loading
when green flag clicked
if (length of [cloud hits v] :: list) then
broadcast [game over v]
end
and the other:
when I receive [game over v]
forever
switch costume to [costume3 v]
stop [all v]
end
RokCoder RokCoder loading
Using your approach, something like the following is what you need -
when green flag clicked
set [clouds v] to (0)
wait until <(clouds) = (10)>
broadcast [game over v]
EarvinKeel EarvinKeel loading
it works now!