Saving A Dictionary within Dictionary

0 favourites
  • 3 posts
From the Asset Store
Electric Cage
$5.99 USD
Dodge electric balls and survive in an unpredictable spaceship within an electric cage!
  • Would it be feasible to save a dictionary(with changing values) "AsJson" as values for keys of another dictionary.

    I am wanting to do this so that i would finally get a single dictionary to ultimately save & Load with Local Storage.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Sure, I do this all the time. I prefer to save one key in Local Storage, which is a dictionary that keeps different variables, as well as different other dictionaries/arrays as JSON strings.

  • Data from the BinaryData, JSON, Array, Dictionary and XML plugins can all be nested within each other, provided you know the correct transformations. This of course makes them compatible with the localstorage plugin as well.

    The "procedural terrain generation" example project uses JSON to store data for zones of the terrain, converts it to a string then places it into a Dictionary. The keys for the Dictionary are based on the location so they can be easily looked up and replaced.

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