Talk:RequestShutdown (Callback)

Add topic
Active discussions

Notes

See SettingsScript

  • Shutdown is merely an API extension of a shut down attempt
  • When Game.LocalSaveEnabled == false,
    • Any shut down attempt shuts down normally
    • RequestShutdown is useless
    • FinishShutdown does nothing
  • When Game.LocalSaveEnabled == true,
    • Any shut down attempt invokes RequestShutdown instead of shutting down
    • RequestShutdown callback return:
      • if true, use custom shutdown prompt
      • if false, use legacy shutdown prompt (popup window)
    • FinishShutdown now does actual shut down
      • localSave: if true, save the place, if false, don't save the place

That's what I noticed too when testing. RequestShutdown only seems to do something when the place was opened in build mode or edit mode (basically, when the fancy rounded black dialog shows), and seems to do nothing when the place was opened from a place file or by opening a new place (when the normal dialog window with yes and no shows asking if you want to save). I'm having some problems with testing it because of the maintenance. --JulienDethurens 03:01, 10 April 2012 (EDT)

I have the studio's web session saved with Fiddler, so I'm looking into it right now. --Anaminus 03:06, 10 April 2012 (EDT)
Hm, so, if I get it, the FinishShutdown method is supposed to be used to save the game. That's what they mean by finishing the shutdown, saving the game. And it can only be saved if it is in a file/could be saved to a file, so that's why it only works if Game.LocalSaveEnabled is true. The localSave argument is whether the player clicked "yes" or "no" in the popup. As for the rest, I don't understand. --JulienDethurens 03:30, 10 April 2012 (EDT)
When you open up one of your places via the website, it turns on LocalSaveEnabled. If you try this, you'll see a GUI save prompt instead of a popup, asking if you want to save your place to the website, not a file. The whole thing is basically an API for replacing the ugly out of place popup. --Anaminus 03:46, 10 April 2012 (EDT)
Return to "RequestShutdown (Callback)" page.