|Login to like|
Submitting a score with construct 2 is incredibly easy. Using ajax you are able to send the information required to our servers to save a score. For security reasons you can not submit scores from your local computer or any other servers. Meaning that you will not receive a completed message when sending with ajax before uploading the game files to this site.
This simple example includes a text label, a text box and a button. When the button is pressed it sends the ajax request to the send URL. You will need to create your scoreboard in your edit game area which will provide you with the send URL (which is blank in the above example). The Ajax "Post to URL" action will need a tag which is used to see if the score has been completed (responds 0 on failure and 1 on success) and make sure you use the POST method.
Underlined is the scoreboardKey which is also found on your edit game page (different for each scoreboard). You will need to include a name which in this example is the text in the text box. The score is set as the variable that is set to 100.
You could also pre fill the text box with the members username if the player is logged in by following this tutorial.
Also take a look at my construct 2 video tutorial: