For a walkthrough of how to integrate Kongregate and Newgrounds into your game, read our article on Stencylpedia.
Starts up the Kongregate API. Must be used before doing anything with the API.
kongregateInitAPI();
Submit a score to Kongregate. First field is the name of the statistic. Second field is the value of it (a number).
kongregateSubmitStat([TEXT], [NUMBER]);
Returns true
if a guest is playing your game on Kongregate.
kongregateIsGuest()
Returns the username of the player who is playing your game on Kongregate, if one is logged in. If it's a guest, the name will be Guest
.
kongregateGetUsername()
Returns the user ID of the player who is playing your game on Kongregate, if one is logged in. If it's a guest, this will come back as blank.
kongregateGetUserID()
Immediately shows a Newgrounds ad in the center of the screen. Can be shown at any point in the game.
newgroundsShowAd();
Submits a score to the specified Newgrounds leaderboard.
newgroundsSubmitScore([TEXT], [NUMBER]);
Shows the specified Newgrounds leaderboard.
newgroundsShowScore([TEXT]);
Unlocks a medal (achievement) by name. Medals are set up on Newgrounds.
newgroundsUnlockMedal([TEXT]);
Sets the default location where the medals are shown. Call this at the beginning of the game - only has to be done once, but it has to be called before the medal shows. This cannot move medal windows that are already visible.
newgroundsSetMedalPosition([NUMBER], [NUMBER]);