Game Development Community

On Collision Game Over (Torque 2D)

by AndrewD92 · in Game Design and Creative Issues · 03/22/2012 (2:28 am) · 1 replies

Is there a way to code a function which displays a "Game Over" message if the play is collided with.
Currently, I have collision detection response to "kill" the players character when an object collides with it however the game continues to play. I want to code a function to end the game once the player has died but have no idea how to do this.

About the author


#1
05/02/2012 (12:00 pm)
May want to try the 2D specific forums, but at a very basic level you would want to delete all the objects from the scenegraph and load a new one that displays game over. Alternatively you could have it load a new level that displays game over, and then loads back to the initial start game level.