How Do I Auto Pause When User Closes Game

uhyanauhyana Member Posts: 36
edited April 2012 in Working with GS (Mac)
I tried searching for on answer for about half an hour and couldn't find one. When testing my game on my iPhone if I hit the home button and re-open the game, it starts at the main menu. I don't want it to do that. How can I make the game go to the last scene where it left off at when the user re-opens the game. Also, if the user is in the middle of playing on the game scene, I want to make the game automatically go to the pause menu if the user accidentally closes the app or gets a call. So when they re-open the app it goes to the pause menu and they hit resume. Does anyone know how to do this?

Best Answer

Answers

  • jckmcgrawjckmcgraw Member Posts: 647
    @uhyana

    I don't think that it is possible to trigger a pause menu, but as @TShirtBooth said, it will automatically pause it (in multitasking), and resume once the app is opened again.

    That would be a nice feature added for the game to automatically go to pause screen.
  • jckmcgrawjckmcgraw Member Posts: 647
    @tshirtbooth

    Could you explain what the hibernate feature even does? I have seen it, but I don't have any idea what it does.

    Thanks
  • jckmcgrawjckmcgraw Member Posts: 647
    @tshirtbooth

    Whoa that's awesome! So I could save attributes when the home button is pressed... not as soon as they are changed. Suite!

    Thanks!
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    @tshirtbooth

    Have you tested it? SSS said it was exclusively for nook, would be sweet though if it works on ios too.
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    Thats awesome man, thanks for sharing.
  • uhyanauhyana Member Posts: 36
    Ok cool, thanks for all the info! I'm a newb, where exactly do I find "When Hibernate" ? Is it a behavior? Because I don't see it.
  • ZoytZoyt Member Posts: 374
    About hibernation... Does it occur when the "20% battery" window pops up and the user puts the device to sleep too?
    Thanks and I wondered what that was.
  • JustMe74JustMe74 Member, PRO Posts: 542
    Yep. I used it in my newest game on iOS and it worked as expected.
    That's awesome. I had no idea you could do that, but I just implemented it in my game and it does indeed work really well...!
Sign In or Register to comment.