game_save

Save a game to a file.

Syntax:

game_save(filename);


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


Returns: N/A


Description

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..


Example:

if keyboard_check_pressed(ord("S"))
   {
   global.Saved = true;
   game_save("Save.dat");
   }

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