GameJolt: Login, Achievements and Leaderboards Implementation

Index

Stats

3,066 visits, 7,358 views

Translations

This tutorial hasn't been translated.

Tools

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!

  • 0 Comments

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