Skip to content
This repository has been archived by the owner on Apr 5, 2021. It is now read-only.

Achievements

Arnis Lielturks edited this page Dec 18, 2018 · 4 revisions

Achievements (bottom left corner)

To display achievement call the following command

C++ and AngelScript:

VariantMap data;
data["Message"] = "Entered menu!";
SendEvent("NewAchievement", data);

Application also supports automated achievement displaying. Data/Config/Achievements.json contains list of all automated achievements. The idea is that achievement has specific event which it has to listen and when specified threshold is reached (number of times when specific event was called), achievement is show in the UI automatically.

Example:

[
    {
        "Event": "Released", // Event that we will use for listening "Released" is and UI button event
        "Image": "Textures/Achievements/button-finger.png", // Achievement image witch will be displayged
        "Message": "Press UI button 1 time", // Message that will be displayed when this achievement is unlocked
        "Threshold": 1 // How many times the "Released" event must be called till the achievement is considered unlocked 
    }
]
Clone this wiki locally