game_load_buffer

Loads a saved game state from a buffer.

Syntax:

GML Code Example

game_load_buffer(buffer);


Argument Description
buffer The buffer id to load from.


Returns: N/A


Description

With this function you can load a game state that has been saved previously. The game is loaded from a previously created "grow" buffer (see Buffers) and the buffer must have had a game state saved to it using game_save_buffer function.


Example:

GML Code Example

if keyboard_check_pressed(ord("L"))
    {
    if global.Checkpoint game_load_buffer(save_buff);
    }
 

The above code will load a previously saved game state from the buffer indexed in the variable "save_buff", only if the global variable is true, when the player presses the "L" key.


Next: game_save



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