• 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!

GameMaker Help with custom file paths

P

Pezzi

Guest
How do you save files to a custom path after you turn off file sand boxing? I've looked around for about an hour now and cannot find any documentation on how to save to a custom location. I want to save a text file to my desktop specifically. I'm probably just overthinking it and it's really easy but i'm clueless right now.

Thanks for any help.
 

TsukaYuriko

☄️
Forum Staff
Moderator
Specify an absolute file path to override the automatic pathfinding.

The following creates an empty file on my desktop, for example:
Code:
file = file_text_open_write("C:/Users/Satsuka/Desktop/test.txt");
file_text_close(file);
If you want this to be dynamic, you should be able to get the current user's desktop folder location via environment_get_variable.
 
Top