Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Jackpumpkinhead on Fri 06/01/2012 17:29:44

Title: Using screenshots in game
Post by: Jackpumpkinhead on Fri 06/01/2012 17:29:44
So I am working on an idea for a game and one of the characters items is a camera. I thought that within the game you could take pictures of things in the game and look at these pictures to assist in solving puzzles. So my question is if it is possible to take a screenshot in the game and recall it to look at it later in the game?
Title: Re: Using screenshots in game
Post by: Khris on Fri 06/01/2012 17:54:19
Sure:
http://www.adventuregamestudio.co.uk/manual/DynamicSprite.CreateFromScreenShot.htm

Just make sure the array of DynamicSprites is global.

Example:

// GlobalScript.asc

DynamicSprite*photo[100];
int photo_count;

// on_key_press

  if (keycode == eKeySpace && photo_count < 100) {
    photo[photo_count] = DynamicSprite.CreateFromScreenShot();
    photo_count++;
  }
Title: Re: Using screenshots in game
Post by: on Fri 06/01/2012 18:00:41
There was a RON game once that boasted a fully functional camera for Mika, wich was also implemented that way IIRC. It was great fun, but unfortunately limited to one photo- as soon as you took another one the old one was replaced, so I really suggest you use an array.

A digital camera comes to mind, incorporated as a GUI that allows quick browsing.