Saving and loading to and from external file?

0 favourites
  • 4 posts
From the Asset Store
Convert multiple Excel files into JSON files and import them into construct3.
  • Hello folks,

    I know this should be possible and relatively easy, but I can't wrap my old brain around this and have not been able to find a complete answer here.

    For a webbased educational app I am developing I am looking for a way to save the state to an external file (probably JSON) and load it later. This could be on a different system at a school so it has to be an external file, not local storage.

    So far I think I managed to save the state to a JSON file (saving the game, on save complete invoke download of the string SaveStateJSON). But I can't work out how to load the state from this file again. I know there is a "load game from JSON" action, but I don't know how to get it to read the external file.

    Any help would be much appreciated!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Use the "File system" or "File chooser" plugins to load up local files.

  • Thanks! When the file is loaded, how do I access the JSON string within to load the state?

  • Got it working, thanks! I had to use to file chooser to load it and the AJAX object to get the string.

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