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.
game_load_buffer(buffer);
Argument | Type | Description |
---|---|---|
buffer | Buffer | The buffer to load from. |
N/A
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.