Need help with Array, AJAX, File Array...

1 favourites
  • 3 posts
From the Asset Store
Convert multiple Excel files into JSON files and import them into construct3.
  • I created an array in the file section of my game via right click-> create file and filled it up with the data I wanted to. I managed to get AJAX to fetch it and put it into an array to be used in-game.

    I want the next time the player loads game to be able to access updated Array

    (has completed this level, has found bonus coin in this level etc..)

    so I attempted to download JSON file every time I complete a level or find and item but it results in "GAME_ARRAY.JSON", "GAME_ARRAY(1).JSON", "GAME_ARRAY(2).JSON", "GAME_ARRAY(3).JSON", "GAME_ARRAY(4).JSON"... AJAX does not seem to be able to find these downloaded array file and effectively progress is erased for every run of the game and the player would have to do a perfect run every time if they want to finish. At least that's how it seems when testing the game.

    I don't want to have to export and publish the game only to find the player is unable to save progress for each run.

    What do I do?

    Tagged:

  • Hiya, you don't download a file to save the game. With local storage you set an item to array.AsJSON when you want to save it and then get the item when you want to load the saved array.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hiya, you don't download a file to save the game. With local storage you set an item to array.AsJSON when you want to save it and then get the item when you want to load the saved array.

    Thanks. I figured it out

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