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

Saving to alternate locations

I have a piece of code that takes a screen shot.

num = 0;
screen_save(working_directory + "\Screens\Screen_"+string(num)+".png")

Please can someone tell me how to save this is a sensible place like the my pictures folder.

I fear this can't be done please tell me i'm wrong.
 

YellowAfterlife

ᴏɴʟɪɴᴇ ᴍᴜʟᴛɪᴘʟᴀʏᴇʀ
Forum Staff
Moderator
There's a number of extensions that allow to write wherever you want (and OS allows to) on Windows. Many are free.
 

Yal

🐧 *penguin noises*
GMC Elder
There should be two functions named something like get_open_filename() and get_save_filename() to get you permissions to read/write a file anywhere on the PC for the duration of the game session, they're available for all desktop targets.
 
That sounds interesting. Would you elaborate.
There's a number of extensions that allow to write wherever you want (and OS allows to) on Windows. Many are free.
I have never used extensions before. I was hoping to avoid them if possible for something that should be so basic.

The other guy seemed to be suggesting that I can execute a gms2 command that will open up the system for writing. Does this mean I can say open for writing then use my code stated above with a specific path.
 

YellowAfterlife

ᴏɴʟɪɴᴇ ᴍᴜʟᴛɪᴘʟᴀʏᴇʀ
Forum Staff
Moderator
I have never used extensions before. I was hoping to avoid them if possible for something that should be so basic.
It's not particularly challenging - after installing an extension, you can use extension's functions (e.g. file_copy_fmns for that extension) same as if they were built-in functions.

The other gal seemed to be suggesting that I can execute a gms2 command that will open up the system for writing. Does this mean I can say open for writing then use my code stated above with a specific path.
get_save_filename is a little different - it shows a file dialog for saving (much like what you usually see in editors when doing "save as") and then you are allowed to write in the returned path after user picked the destination. Example in GMS1 and GMS2 documentation illustrates this exact scenario.
 
It's not particularly challenging - after installing an extension, you can use extension's functions (e.g. file_copy_fmns for that extension) same as if they were built-in functions.


get_save_filename is a little different - it shows a file dialog for saving (much like what you usually see in editors when doing "save as") and then you are allowed to write in the returned path after user picked the destination. Example in GMS1 and GMS2 documentation illustrates this exact scenario.
Great I figured this out now. Thank you so much for your help guys. Was very easy in the end. Awesome, thank you guys. :)
 
Top