I'm going to make a game with 5 lives but I have a problem. Iv'e been trying everything but I don't know how to make a game and if a variable goes to zero.I'm trying to use if then find something that fits into the spiked then somehow make it if life +0 the game ends. Please tell me how to do this. Please
Offline
No problem.
I am assuming you are saying that you want to make a script that makes the game end if the lives variable gets lower than 1:
When gf clicked set [lives v] to (5)
When gf clicked If <[lives] < [1]> broadcast [game over v]
When I receive [game over v] Whatever you want it to do once game over...Remember, you need to subtract 1 from "lives" each time the player does something to lose a life. Do this:
change [lives v] by (-1)Hope that helps. If you have any more questions, please ask away.
Last edited by CAA14 (2013-02-20 22:34:11)
Offline
nickyg17 wrote:
say[Didn't work! Sorry!]
Can you post your scripts?
Regards,
CAA14
Offline
when gf clicked forever if <<variable> = [0]> stop all end
Offline
piguillaud wrote:
when gf clicked forever if <(Lives) = [0]> stop all end
Fixed; variables are supposed to have parenthesis around them, not <>. Also, I changed the variable's name to better fit the situation.
Offline
ErnieParke wrote:
piguillaud wrote:
when gf clicked forever if <(Lives) = [0]> stop all endFixed; variables are supposed to have parenthesis around them, not <>. Also, I changed the variable's name to better fit the situation.
thnx dude your right
Offline