• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Need some help with GMFlox

C

comatsu

Guest
I've recently found out about GM Flox on the marketplace, and it seems like a perfect extension to implement cloud saving, leaderboards and other stuff to my game.

However I am having some trouble understanding how to use it - perhaps someone here has some experience with it and can help?

Currently I am just trying to use the system to save the player's level. On game start I use flox init, and once the player starts the game, a new entity 'Save' is created. In this the player saves a property named 'level' with their level number.

Now when the player closes the game and starts again, I want the next time he sets the 'level' property to update the previous property he had created. Instead when I use
Code:
flox_entity_set("Save","level",2)
this creates a new property with the new level number.

I understand that I am supposed to load the previously existing entity created by the player, but how do i go about it? It seems that to load an entity I need the entity ID, but I do now know how to request this...
 
P

Paolo Mazzon

Guest
I don't have Flox GM, but the documentation is here. Try out that stuff.
 
J

joakimFF

Guest
//save
var player = flox_player_get();
flox_entity_set(player,"level",2)
flox_entity_save_queued();

//load
level = flox_entity_get(player,"level");
 
//save
var player = flox_player_get();
flox_entity_set(player,"level",2)
flox_entity_save_queued();

//load
level = flox_entity_get(player,"level");
is there a string limit for saving a ds_list converted to a string?

also, does anyone know when is the best time to save and load?
 
J

joakimFF

Guest
Yes there is a limit but I dont remember the exact number, but its big enough like 100000 +,

return question have you tried or could you try loading leaderboard scores by ids, im getting nothing in return and starting to wonder if there is a bug in Flox.
 
Yes there is a limit but I dont remember the exact number, but its big enough like 100000 +,

return question have you tried or could you try loading leaderboard scores by ids, im getting nothing in return and starting to wonder if there is a bug in Flox.
using ID's instead of Scope?
 
J

joakimFF

Guest
yeah I have read that one,

this is Ryans / RaniSputniks own words on how to do it,


var leaderboard_id = "myleaderboard";
var friends = ds_list_create();
// Add specific player ids into the friends list
ds_list_add(friends, "xb23hb30423n","ask1298123i","hb12u39nkjs");
// Load the scores for the players specified
flox_leaderboard_load(leaderboard_id, friends, scrOnScoresLoaded,scrOnScoresFailed);


but the list I get back is empty. for me this is a huge problem as its the only way to get players outside of the top 200 range, as flox only sends you the top 200 when using daily/weekly/month scope. meaning without it it is impossible to rank friends against each other.
 
S

Soulie

Guest
yeah I have read that one,

this is Ryans / RaniSputniks own words on how to do it,


var leaderboard_id = "myleaderboard";
var friends = ds_list_create();
// Add specific player ids into the friends list
ds_list_add(friends, "xb23hb30423n","ask1298123i","hb12u39nkjs");
// Load the scores for the players specified
flox_leaderboard_load(leaderboard_id, friends, scrOnScoresLoaded,scrOnScoresFailed);


but the list I get back is empty. for me this is a huge problem as its the only way to get players outside of the top 200 range, as flox only sends you the top 200 when using daily/weekly/month scope. meaning without it it is impossible to rank friends against each other.
Did you have any luck solving this in the end? I'm using flox too.
 
Top