It’s very simple. For this example, I create a achievement “You’re monster” with description “Welcome to Apeurture Science Enrichment Center”, is hidden, the player gets it when he create a Portal Game, color green, and when the player gets it, he gets the achievement “Detective” and GLaDOS appears.
GDT.Achievements.youremonster({
id: "youremonster",
name: "You're monster".localize("achievement title"),
description: "Welcome to Aperture Science Enrichment Center",
isAchieved: function (company) {
var game = company.gameLog.last;
return game.name == "Portal" && game.topic == "Sci-Fi" && game.genre == "Adventure" &&
}
tint: "#F4B300",
value: 150,
hidden: true,
completed: function (a) {
document.writeln("<img id=\"glados\" src=\"http://upload.wikimedia.org/wikipedia/en/b/bf/Glados.png\" />") var glados = $("glados");
for (i = 0, i < glados.height - 10, i++) {
glados.offset({
top: i - glados.height(),
left: (innerWidth / 2) - (glados.width / 2)
});
j = i
}
for (i = j, i = > 0, i--) {
glados.offset({
top: i - glados.height(),
left: (innerWidth / 2) - (glados.width / 2)
})
}
}
}
If you have any question for the code, you have a “Reply” button :trollface:.