• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Legacy GM Saving/Loading, where the player can choose what they call the save file.

E

Eggyy

Guest
I have 2 objects, called 'obj_save' and 'obj_load'.

I'm not too sure how to do this, but how on earth do I set the files up so that the player can choose what they want the save name to be, and then load from that same save name. This way, the player can have multiple saves, with names that they wish.

If possible, It would also be preferred if these saves could be placed in save files.
 
H

Homunculus

Guest
A simple solution would be to use a dedicated forder that only contains save files. This allows you to generate a list of saves by using the file_find_* functions.

Keep in mind though that not all characters are allowed to be used in a filename, and those may vary from one operating system to the other.

A more robust approach may be to keep a “saves index” file that keeps a list of saved games and their user defined name, while in fact you are using something like an incremental number for the actual files.
 
Last edited by a moderator:
If you check in the manual under File Handling / File Systems / File System Functions, there are functions for giving a dialogue box to choose a save place and name.

get_save_filename_ext(filter, fname, directory, caption);

That might be a good place to look, though I haven't used it in ages and can't say 100% it is what you're looking for.
 
Last edited:
Top