Save scores in an external file

0 favourites
  • 2 posts
From the Asset Store
Source File, music and art pack for Android Negotiator
  • Hello there !

    I need a little help. I am currently creating a HTML5 game. For many reasons i need to keep some informations such as Name of the player, his score and so one. Is there a way to export those informations as a Json file ?

    I need to keep this file on the server. I tried with the "download" function but it creates a DL link... I need the game to automatically select the folder and save...

    How do i export these informations as a Json file with Construct 2 ?

    Please help and thanks a lot !!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If you need to keep the information on a server you then need the AJAX plugin to call a saving script on your server (that script is out of the scope of C2 and totally dependent on your server, coding language, etc...)

    Simply pass the name, score, etc... through the AJAX call.

    Be sure to look at the how do I FAQ to find out some examples of AJAX calls to a server, passing informations in the process.

    Finally, if you want to get the infos as JSON, you likely want to first put them into an array and only pass the array.asJSON expression for that array.

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