Preserve Scenes - Reset Game Issue?

JCFordJCFord Member Posts: 785
edited November -1 in Working with GS (Mac)
I have a GS project when I have

Scene 1 - Splash screen
Scene 2 - Main menu
Scene 3 - Game level One
Scene 4 - Game level Two
Scene 5 - Game level Three etc

So the first time the user plays the game it goes through the splash screen and then onto the main menu. When the user starts to play the game, I have PRESERVE SCENE ON so the player can flick back and forth though game levels 1, 2 and 3 killing the enemies in the levels as the go.

Now the problem is when the player dies I really want the player to go back to the main menu so they can play again, but it I use GO TO SCENE (MAIN MENU) when the user starts to play AGAIN for the second time because the PRESERVE SCENES was on the scenes are like they were left and have NOT reset!

However if I use a RESET GAME action when the player dies, then the game goes right back to SCENE 1 which does reset all the scenes but displays the splash screen AGAIN, which is not what I want.

Although there is a RESET SCENE command I cannot seem use it as it only appears to be relevant to the scene it is in?

So the question is how can I preserve all my scenes, but when the user dies, reset all the scenes and then jump to the MAIN MENU skipping the SPLASH screen?

Comments

  • BeyondtheTechBeyondtheTech Member Posts: 809
    A quick workaround would be to create a boolean Game Attribute called SkipSplash, set it to TRUE, then Save the Attribute. In the beginning of your application, set the default Attribute to FALSE, Load that Attribute and if it loads a TRUE, then set it to FALSE and skip the splash screen as needed.

    In theory, that would work. Let me know if it's a viable solution.
  • JCFordJCFord Member Posts: 785
    I thought of that, I haven't tried it but when I RESET GAME that will override everything and start the game as new playing the splash screen again - no?
  • BeyondtheTechBeyondtheTech Member Posts: 809
    Reset Game will reset all live Scenes and Attributes, but since you Saved that value to storage, Loading it will override the initial value, making it useful for the next launch or relaunch of your game.
Sign In or Register to comment.