How do I save on exit?

0 favourites
  • 6 posts
From the Asset Store
Match the similar cards with each other and free all animals!
  • I'm making an idle game. A typical feature of these games is that you can close them at any time and progress will be saved. How do I get this behavior? "on end of layout" event is not when the window is closed, making this an unsuitable trigger.

  • The browser object has onSuspended and onResumed.

  • OnSuspend is for when the user alt-tabs. It might be called when they close, but it will also be called very frequently.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • OnSuspend is for when the user alt-tabs. It might be called when they close, but it will also be called very frequently.

    If you are referring to closing an application through a button you can use the Browser "Close" action. And just say the progress before it. But if you are talking about closing the application using the "X" in the top right corner, then such feature is not available unfortunately.

  • Is "On Browser Close" a feature added betwee 206 and 210? I don't see it on 206.

  • Its the browser object and an action called "Close" its not an event. I think it have been there since the browser object have been there, but yeah definitely further back than 206. There are no events that triggers on a close action as far as I know.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)