Game over when actor touches edge of screen
TheTiger
Member Posts: 53
Hi everyone, I wanted to know, how I would end the game, when my actor(a snake) touches the edge of the screen.
So when my actor(a snake) touches the edge of the screen, I want it to say game over, display the score, a retry button and also go back to main menu button.
Please can you explain in as much detail as possible, thank you.
Comments
There are a few ways you could handle that.
Surround your screen edges with an actor that when touched will trigger the end game events. This actor should be placed on the pasteboard beyond the edge of the screen so the player can't see it.
Keep track of the players X and Y locations and use these to trigger the end game events when they go beyond the edges of the screen.
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
Thanks for that Jamie_c.
I want to have the game over, score, retry and back to main menu on the same screen as where you play the game, so I want the game in the backround, so would I have to create another scene? How would I do it?
Thanks.
I answered that question here: http://forums.gamesalad.com/discussion/comment/521515/#Comment_521515.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User