How do I save and load variables using File System?

0 favourites
  • 3 posts
From the Asset Store
Convert multiple Excel files into JSON files and import them into construct3.
  • I've managed to get my save and load system to work with state save JSON but I prefer to save variables instead of state save in case of issues in the future when I update the game. Also I'd like to separate my settings saves and game saves.

    I'm new to using the file system, thanks for your help in advance.

    Tagged:

  • The easiest way is to put all variables into a dictionary. Then write Dictionary.AsJSON to a text file.

    To load: read the text file and use 'Dictionary Load from FileSystem.FileText'. Then extract all variable values from the dictionary.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Show cmr333's deleted post

    The easiest way is to put all variables into a dictionary. Then write Dictionary.AsJSON to a text file.

    To load: read the text file and use 'Dictionary Load from FileSystem.FileText'. Then extract all variable values from the dictionary.

    Thanks, is it possible to expand on your method? I've never used dictionary before and I want to make sure I'm doing it correctly.

  • The easiest way is to put all variables into a dictionary. Then write Dictionary.AsJSON to a text file.

    To load: read the text file and use 'Dictionary Load from FileSystem.FileText'. Then extract all variable values from the dictionary.

    Thanks! I managed to figure out the rest on where I was going wrong as I've never used Dictionary before and I'm new to File System

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