Retry button to reset scene using tshirtbooths cut the rope menu template
Hey Guys,
I have tried to search the forums for a ppl having the same problem with me but all im seeing if ppl having problems resetting scenes with lives. Basically when the main character dies, the game over screen pops up with a retry button and a main menu button. I want the retry button to reset the scene that the player last played instead of being brought back to the first level.
How do I tell the retry button to know what level the player is currently on to reset it if the player dies?
I have tried to search the forums for a ppl having the same problem with me but all im seeing if ppl having problems resetting scenes with lives. Basically when the main character dies, the game over screen pops up with a retry button and a main menu button. I want the retry button to reset the scene that the player last played instead of being brought back to the first level.
How do I tell the retry button to know what level the player is currently on to reset it if the player dies?
Comments
Basically, I have a boolean game attribute called resetting. When the fireball explodes, or the level is reset, the game.resetting attribute is changed to true. Actors in the scene (by using rules) act accordingly... like not using collision detection and/or turning to Alpha Zero.
Then, I pan the camera back to the beginning of the scene... this is done with two interpolates. While the interpolates are running, I'm also using a timer to reset the fireball, the game.reset attribute and other important attributes.
BOOM... everything returns back to normal. I think it's really quite sweet.
By not destroying actors, I don't have to worry about replacing them. Also, this can be triggered by a pause scene. Pause game, press reset button, resetting is turned to true and the game is unpaused. That's where I'm at now. I know that if I go too crazy with the pause menu, it could slowdown my game.
My game doesn't have lives. But if it did, that's just change attribute lives to lives-1 when the fireball explodes.