Save a game to a file.



Argument Description
filename The name of the file to save the game to.

Returns: N/A


With this function you can do a basic save of the game to a given file.

NOTE: This function is very limited and it is designed for the beginner to get a save system up and running quickly, but more advanced users may prefer to code their own system using the File functions, due to the fact that the game will not save any of the dynamic resources like data structures, surfaces, added backgrounds and sprites etc..


if keyboard_check_pressed(ord("S"))
   global.Saved = true;

The above code will set a global variable to true and then saves the game to the file "Save.dat" when the key "S" is pressed.

Back: Miscellaneous
Next: game_save_buffer
© Copyright YoYo Games Ltd. 2018 All Rights Reserved