V
Verilyzed
Guest
hello,
i want to give my players a achievement to log in. I followed this:
https://help.yoyogames.com/hc/en-us/articles/360004359392-Android-Google-Play-Services-Achievements
My Code in Create Event:
My Async Social event:
Any suggestions?
i want to give my players a achievement to log in. I followed this:
https://help.yoyogames.com/hc/en-us/articles/360004359392-Android-Google-Play-Services-Achievements
My Code in Create Event:
Code:
global.PlayerConnected = false;
cloud_sync_id = -1;
cloud_save_id = -1;
if (achievement_available() && global.PlayerConnected == false) {
if (!achievement_login_status()) {
achievement_login();
show_debug_message("Logging Player In");
} else {
global.PlayerConnected = true;
cloud_sync_id = cloud_synchronise();
show_debug_message("Player Logged In!");
achievement_post("achievement_a_nice_beginning", 100);
}
} else {
show_debug_message("Cannot Connect To Google Play");
}
Code:
if (ds_map_exists(async_load, "id")) {
if (async_load[? "id"] == achievement_our_info) {
global.PlayerName = async_load[? "name"];
cloud_sync_id = cloud_synchronise();
show_debug_message("Player Logged In Correctly");
achievement_post("achievement_a_nice_beginning", 100);
}
}