Need help with a retry button

JackYdJackYd Member Posts: 93
edited November -1 in Working with GS (Mac)
I have multiple scenes and I have the game set up that when the player dies, a gameover scene appears with a retry button. How do I have one button to reset all the scenes that I have within my game.

For instance, if the player dies on level 4, i want the retry button to reset level 4. If the player dies on level 5, i want the retry button to reset level 5. What would the code look like?

Comments

  • chicopchicop Member Posts: 263
    are you creating a new scene for the retry button?

    i have a retry button in each level/scene so when that is pressed it resets that level/scene not any other...

    i set the alpha of a button to 0 (hide) then if alpha is 1 on touch reset scene

    the only thing you need then is on level win turn reset button alpha 0 to 1...
  • OkyshoOkysho Member Posts: 158
    What Chicop said: all it takes is a reset scene behaviour. I would actually use a game pause with the retry button, rather than moving to a seperate scene.
Sign In or Register to comment.