If you just want to use the built in save engine in Game Maker but with three file slots, then
game_save(string) Saves the game to the file with name string.
game_load(string) Loads the game from the file with name string.
should do you. So, for instance, you could have global.fileslot equal 1, 2 or 3, and when you load, do
game_load("save_file"+string(global.fileslot)+".sav")
and to save it,
game_save("save_file"+string(global.fileslot)+".sav")
So that would be save_file1.sav or whatever. You'd then make a menu to choose what global.fileslot needs to be, and you could use file_delete() and file_copy() with the same name to, err, copy and erase files.
If you wanted to do that with drag and drop, then just use the Save-the-game and Load-the-game icons, and put "save_file"+string(global.fileslot)+".sav" as the file name.
If you want to use your own method of saving, which usually uses a lot less memory, then you need to write down what you want. Let's say you want to store the current room, the number of lives, and the x and y position only. You could do this with INI files if you want, there are a few examples. Or, if you just want to do a very basic thing, then...
We'll make the files like this:
room
lives
x
y
Because each thing is on a new line, it'll be fairly easy to read and write. To write it, we just need to overwrite what's there.
So, in a delightful script:
//save_game_progress(string)
var id;
file_delete(argument0) //delete what's already in the file
id = file_text_open_write(argument0) //Open the file
file_text_write_string(id,string(room)) //So write the room
file_text_writeln(id) //Then a new line character
file_text_write_string(id,string(global.hearts)) //Then the lives, supposing you're using global.hearts
file_text_writeln(id)
file_text_write_string(id,string(x)) //Now the X
file_text_writeln(id)
file_text_write_string(id,string(y)) //and the y.
//Now close the file and end.
file_text_close(id)
return id;
and then to load it:
//load_game_progress(string)
var id;
id = file_text_open_read(argument0) //Open the file
room=real(file_text_read_string(id)) //So READ the room
file_text_readln(id) //Then a new line character
global.hearts=real(file_text_read_string(id)) //Now the hearts
file_text_readln(id)
x=real(file_text_read_string(id)) //and the x
file_text_readln(id)
y=real(file_text_read_string(id)) //and the y
file_text_close(id)
return id;
You could then use the above code, but with load_game_progress instead of game_load, and so on.
I'm fairly tired and may have just chatted nonsense for all that, if so, sorry >_>