• 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 Screenshot to the program directory?

Fixer90

Member
I'm trying to, upon using this function, save a screenshot to the folder I put my program:
Code:
screen_save(program_directory + "NAME OF SCREENSHOT" + ".png");
But it simply doesn't do anything.
 

RollyBug

Member
Hi there. The manual page for screen_save says that the argument is simply the name of the file, and this is stored at C:\Users\YOURUSERNAME\AppData\Local\YOURGAMENAME\. I'd wager that this is where your trouble lies - You're simply looking in the wrong place.
 

Fixer90

Member
Hi there. The manual page for screen_save says that the argument is simply the name of the file, and this is stored at C:\Users\YOURUSERNAME\AppData\Local\YOURGAMENAME\. I'd wager that this is where your trouble lies - You're simply looking in the wrong place.
I'm using program_directory, not working directory.
 

RollyBug

Member
I could be totally wrong as I honestly haven't worked with screenshots all that much, but just in case, does anything show up in your local\projectname folder?
 
B

Bayesian

Guest
Try this
screen_save(program_directory + "\\NAME OF SCREENSHOT" + ".png");
also read the console are you getting this error: "Error! not allowing save with filename"

To find the working directory run the game and open task manger (control+shift+escape) and find runner.exe in the process list and right click > open file location
 

CMAllen

Member
Without an extension that lets you move outside the game's sandbox, you cannot save files to any place EXCEPT the working directory. That's it. That is the only location the GM will allow data to be saved. GM's sandbox rule provides an exception only on the windows platform, and only in the form of the standard windows save/load dialog box.

If you want to save/load files from any other location, you're going to have to use an extension with functions that lets GM step out of its sandbox.
 
Top