0 Favourites

Save scores in an external file

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

  • Construct 3

    Buy Construct 3

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

    Buy 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)
Similar Topics Posts Views Last Post
Unread hot topic
77 6,463
Kyatric's avatar
Kyatric Construct Team Support
Unread hot topic
34 2,598
Magistross's avatar
Magistross
Unread hot topic
42 6,140
irina's avatar
irina