• 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!

Saving And Loading When Targeting Xbox/UWP

Hello, can someone help me understand how the "Saving And Loading When Targeting Xbox" actually works?

I've tried this before in the last version of GMS, but I don't quite understand the instructions on the link. It doesn't explain if I'm supposed to add the async code in a script with my normal save code or to add it to an object in the Async Save/Load.

If you have already done this and could help out, that would be nice. I'm currently using .ini files to save/load my game and is being done by using gml scripts, such as: ini_save("data.ini"); and ini_load("data.ini"); The scripts consist of the usual "ini_write" and "ini_read" functions.
 

rytan451

Member
The first code box, just by its contents, quite evidently needs to be called in the place of your normal save code, and it eventually triggers an async event. The second code box needs to be called when you start loading a save, while the third code box gets called in an async event (and gets the data inside the loaded savefile).
 
The first code box, just by its contents, quite evidently needs to be called in the place of your normal save code, and it eventually triggers an async event. The second code box needs to be called when you start loading a save, while the third code box gets called in an async event (and gets the data inside the loaded savefile).
You basically just resaid what the help says. Which I still don't see any way to apply it. I have it where the save function is actually saving, but when I try to load nothing happens. I don't even get any errors.

My save is set up in this sort of way:

Player collides with an Object that triggers a Save Script.
When loading, the Players chooses Load Game from a menu that triggers a Load Script.

What I'm saying is, I saw one forum post where someone was having problems with it and they had code in a Persistent Object using an Async Save/Load Event. Do I need to use an Object's Async Event or can I just use Scripts?

If anyone else has done this, please give an example. Just because this is UWP/Xbox Creators Program related, it is not confidential. As the help file is public.
 
Top