How do I save and load variables using File System?

Not favoritedFavorited Favorited 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:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.

  • 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)