C3: Submit Kongregate Statistic (e.g. Highscore) in HTML

3

Index

Attached Files

The following files have been attached to this tutorial:

.zip

Stats

4,367 visits, 7,605 views

Tools

Translations

This tutorial hasn't been translated.

License

This tutorial is licensed under CC BY 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.

Published on 9 Dec, 2017. Last updated 19 Feb, 2019

Change the index.html after exporting

after exporting open the index.html in Notepad++ (or some other program)

copy paste this before the </head> (you have to do this everytime you export your game)

    <script src='https://cdn1.kongregate.com/javascripts/kongregate_api.js'></script>
    
    <script type='text/javascript'>
    kongregateAPI.loadAPI(function(){
      window.kongregate = kongregateAPI.getAPI();
    });
    </script>

The Index.html should look something like this:

And that was it. You can now execute the javascript kongregate.stats.submit function in your Contruct Events and submit scores like that.

.ZIP
  • 1 Comments

  • Order by
Want to leave a comment? Login or Register an account!
  • Thank you very much!

    I noticed you put the variable 'Score' between quotation marks and two ampersands, as: "&Score&"