Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: dbuske on Wed 29/05/2013 16:22:34

Title: Screenshots
Post by: dbuske on Wed 29/05/2013 16:22:34
I read that F12 should send an ingame screenshot to the games directory.
I tried it and it didn't work.
How do I take a screenshot?
Title: Re: Screenshots
Post by: Stupot on Wed 29/05/2013 16:50:43
A game needs this in the global script, otherwise it won't work.
Code (AGS) Select
function on_key_press(eKeyCode keycode)
{
  if (keycode == eKeyF12) SaveScreenShot("scrnshot.bmp");
}
Title: Re: Screenshots
Post by: Khris on Wed 29/05/2013 16:54:09
This will only work if the according line is in on_key_press(), it's not hard-coded.
Here's the line from the default game:
Code (ags) Select
  if (keycode == eKeyF12) SaveScreenShot("scrnshot.bmp");  // F12
Note that this won't work during blocking events.

The file is saved to the save game directory, which is usually in C:\Users\[username]\Saved Games\[game name]
Title: Re: Screenshots
Post by: dbuske on Wed 29/05/2013 17:14:55
Thank you