buffer_async_group_begin

Begin the definition of a buffer group for asynchronous saving.

Syntax:

GML Code Example

buffer_async_group_begin(groupname);


Argument Description
groupname The name of the group (as a string).


Returns: N/A


Description

This function is called when you want to begin the saving out of multiple buffers to multiple files. The "groupname" is a string and will be used as the directory name for where the files will be saved, and should be used as part of the file path when loading the files back into the IDE later (using any of the buffer_load functions). This function is only for use with the buffer_save_async() function and you must also finish the save definition by calling buffer_async_group_end() function otherwise the files will not be saved out.

Note that for the console platforms (like PS4 for example), the "groupname" will be used as the save slot description, and using this function can help you avoid having the UI show for every file that is being saved out.


Example:

GML Code Example

buffer_async_group_begin("SaveGame");
 save1 = buffer_save_async(buff1, "Player_Save1.sav", 0, 16384);
 save2 = buffer_save_async(buff2, "Player_Save2.sav", 0, 16384);
 save3 = buffer_save_async(buff3, "Player_Save3.sav", 0, 16384);
 save4 = buffer_save_async(buff4, "Player_Save4.sav", 0, 16384);
 buffer_async_group_end();
 

The above code starts a buffer group then sets it to save out 4 files asynchronously. The group definition is then ended (at which point saving will begin).





No Examples Submitted

Does this page need better examples? Be the first to Submit

No Edits Suggested

Is this page unclear or not descriptive enough? Suggest an edit to the page and with enough upvotes your changes will be made.

No Questions Have Been Ask

Do you have a question about this page? Ask it Here