taking screenshots

Started by limeTree, Mon 29/12/2008 19:08:10

Previous topic - Next topic

limeTree

Didn't know where to put this so i put it here.

Does anyone know have to take game screenshots on ags,i tryed loking at the index,it just says something about a code wich i did't cope right.

Ryan Timothy B

Code: ags

if (keycode==434) SaveScreenShot("scrnshot.pcx");  // F12


In other words... Press F12

limeTree

nope,doesnt work,tryed along with all the other buttons

is that code already in my script or i have to put it there?
and i which script?

Ryan Timothy B

#3
It's in the Globalscript in the function  on_key_press

Code: ags

function on_key_press(int keycode) // called when a key is pressed. keycode holds the key's ASCII code
  {
  if (IsGamePaused()==1) keycode=0; // game paused, so don't react to keypresses
  if (keycode==17) QuitGame(1); // Ctrl-Q
  if (keycode==363) SaveGameDialog(); // F5
  if (keycode==365) RestoreGameDialog(); // F7
  if (keycode==367) RestartGame(); // F9
  if (keycode==434) SaveScreenShot("scrnshot.pcx");  // F12
  if (keycode==19) Debug(0,0); // Ctrl-S, give all inventory
  if (keycode==22) Debug(1,0); // Ctrl-V, version
  if (keycode==1) Debug(2,0); // Ctrl-A, show walkable areas
  if (keycode==24) Debug(3,0); // Ctrl-X, teleport to room
  }


Sorry, and yes.  It should already be in your script.
It saves it in your documents folder, in My Saved Games, and the folder the game is called.
This is where it goes if the game is made with version 3 or higher.  Not sure if it does this with the other versions of ags.  Just check the documents folder either way.

limeTree

yes,it works!!

the problem was i tryed to take the screeshots during the action,during the run of the script
and i guess since the command comes from the script it can't react
we can get screenshots only when you are in control of the character
too bad...
i guess i'll use some seperate program to catch some more action  ;D

Khris

Just run the game without filters in a window and press the PrintScreen button on your keyboard.
The paste (press Ctrl-V) the screenshot into a graphics program, Paint will do I think.

Ryan Timothy B

That's all I do.  It's faster, and easier.
And if you find out the image wasn't good enough of a shot after you've pasted, you'd still have the game playing in the window. :P

SMF spam blocked by CleanTalk