I want to be able to save my game's files in a custom location instead of placing it in the default: Local App Data
So far, I learned to create a directory using this code, though I have not tested it yet. I assume this would create a folder in the same location where the executable file is. (If I'm wrong, please inform me! That would be very appreciated)
It was found from this website: https://steamcommunity.com/app/214850/discussions/0/45350244780983621/
I know I can use game_save("filename") to save it, but will it save in the directory? What else do I need to ensure that it saves through that directory I want to set up?
- I plan to have a button that will save the state of my game into a file. Nothing too fancy is necessary so long as it can save progress one way or another.
- I would also appreciate information on Loading the file as well.
I'm still working hard on my project, and I hope to hear from anyone willing and able to help!
So far, I learned to create a directory using this code, though I have not tested it yet. I assume this would create a folder in the same location where the executable file is. (If I'm wrong, please inform me! That would be very appreciated)
GML:
if !directory_exists("saved_files")
{ directory_create("saved_files"); }
ini_open(working_directory + "\saved_files\" + USERNAME+".ini"); // path + filename
I know I can use game_save("filename") to save it, but will it save in the directory? What else do I need to ensure that it saves through that directory I want to set up?
- I plan to have a button that will save the state of my game into a file. Nothing too fancy is necessary so long as it can save progress one way or another.
- I would also appreciate information on Loading the file as well.
I'm still working hard on my project, and I hope to hear from anyone willing and able to help!
Last edited: