Achievements
Achievements in HTML5 games are an exciting and rewarding feature that adds an extra layer of engagement for players. They serve as milestones, celebrating a player's progress, skill, and dedication.
Bridge.achievements.is_supportedBridge.achievements.is_get_list_supportedBridge.achievements.is_native_popup_supportedUnlock achievement
func _ready():
var options
match Bridge.platform.id:
"y8":
options = {
"achievementkey": "YOUR_ACHIEVEMENT_KEY",
"achievement": "YOUR_ACHIEVEMENT_NAME"
}
"lagged":
options = {
"achievement": "YOUR_LEADERBOARD_ID",
}
Bridge.achievements.unlock(options, funcref(self, "_on_unlock_completed"))
func _on_unlock_completed(success):
print(success)func _ready():
var options
match Bridge.platform.id:
"y8":
options = {
"achievementkey": "YOUR_ACHIEVEMENT_KEY",
"achievement": "YOUR_ACHIEVEMENT_NAME"
}
"lagged":
options = {
"achievement": "YOUR_LEADERBOARD_ID",
}
Bridge.achievements.unlock(options, Callable(self, "_on_unlock_completed"))
func _on_unlock_completed(success):
print(success)Last updated