game_load_buffer

This function loads 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 the game_save_buffer function.

 

Syntax:

game_load_buffer(buffer);

ArgumentTypeDescription
bufferBufferThe buffer to load from.

 

Returns:

N/A

 

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 stored in the variable save_buff, only if the global variable is true, when the player presses the "L" key.