Unable to Reset Room

I'm done with my first app, and want to release it. However, I have a bug where the game room (where all the game takes place) doesn't reset. The player plays the game, loses all three lives, and when that happens, is moved to the next room, where an option to reset and play again is given. However, the game just continues to pick up where the the player was left off, continuing score, but with all three lives missing. I've tried having a boolean variable which resets the game scene once the reset button is pressed, but that doesn't seem to work. Any suggestions?

Comments

  • SolarPepperStudiosSolarPepperStudios Member Posts: 754
    When GameReset is true change game.lives to 3 change game.score to 0 move player to X and Y positions. Then change game.reset to false. Is that what you want?
  • asdfGamesasdfGames Member Posts: 15
    Thanks Utveckla, it worked! But for some reason the lives function isn't working yet, but I'm trying to fix that now.
  • SolarPepperStudiosSolarPepperStudios Member Posts: 754
    For lives make an integer attribute and set it to the amount of lives you want and then in your main actor say when player collides with enemy change attribute game.lives to game.lives - 1 then say when game.lives = 0 (reset scene)
  • asdfGamesasdfGames Member Posts: 15
    I realized my error, thanks again! As it was my first app I have a very inefficient and overly complicated lives system. I have notes on what to make better for my next app. Thanks so much!
Sign In or Register to comment.