I'm trying to create a maze game but I really want to know how to:
- End the game when my sprite touches the wall
- Hide sprites from one background
- Start a new level
Please help! :(
Offline
How about this?
End game:
that will reset the sprite to the beginning of the game. If you want a proper "game over" screen to come up, do this instead:whenclicked
foreverifcolour of wall, or if wall is a sprite, use "if sprite touching wall" blockgo tobeginning
Starting new level:whenclicked
foreverifsprite ▼touching colour000000broadcastgame over ▼when I receivegame over ▼do action
Hide sprites (if you want them to be shown on only one of the levels):whenclicked
setlevel ▼to1foreverifsprite ▼touchingfinishchangelevel ▼by1
if I got something wrong, misunderstood you or if you have any questions, askwhenclicked
foreveriflevel = 1whatever level you want the sprite to be shown atshowelsehide
Offline
To end the game when your sprite touches the wall, put this script on it. Just change black to whatever color your walls are if they aren't black already.
whenclicked
forever iftouching color ?stop all
Last edited by gettysburg11 (2012-04-15 11:26:16)
Offline
sorry, colour 000000 was meant to be black
also, on the starting new level one, i should have written
this will make sure that the level doesn't get changed by more than 1ifspritetouchingfinish ▼go tobeginning ▼changelevel ▼by1
Offline