GameJolt: Login, Achievements and Leaderboards Implementation

1

Index

Stats

9,784 visits, 19,470 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 10 Sep, 2013. Last updated 19 Feb, 2019

Achievements!

Adding a trophy on Game Jolt

To add a trophy in Game Jolt, simply go to Dashboard / Manage / Achievements and click add trophy. You will have to set the reward type, a title, a description, and if you want, an image to use as an icon. Once you have set it up, it will be listed and you will see the Trophy ID next to it. Write it down; we'll need it!

Back to Construct 2!

Now, we're gonna setup our first trophy in Construct. Basically, you need to copy these events, and remove the 'set text' function that was only for debugging purposes only.

It should look like this:

Then, you have to decide when you will trigger your trophy. Let's say you have coins in your game. Well, I'm sure you already have a variable that counts how many of them are there. So you can setup something like this and call the function "SetGJTrophy" with one parameter that will be your trophy ID. Like this:

I know that the most experienced ones will probably shout an "OF COURSE!", but for beginners like me, here's an important detail: The parameter you pass on the function must be a string. The "" are essential in this case, if you forget those it won't work!

Now, let's head to Leaderboards!

  • 1 Comments

  • Order by
Want to leave a comment? Login or Register an account!