System/Screenshot

From Blue Mars Developer Guidebook

Jump to: navigation, search
There are security restrictions on this article


This is a System function

Contents

Function

Screenshot(file)
save a screen capture to file
return value - bool true if successful, false if not
file - string filename of the screenshot file

Usage

File Formats

This function can save screenshots in the following formats, specified by the file suffix

  • JPEG - .jpg
  • BMP - .bmp

If no suffix is specified, ".jpg" is automatically appended.

Location

This function will expand the %user% alias. Directories are created as needed.

It is recommended that screenshots be saved to a minigame-specified subdirectory of the user directory. For example:

System.Screenshot("%user%/myminigame/screenshots.screenshot.jpg");

which will show up in the user's "My Games/BlueMars" directory.

Logging

This function performs some logging.

Screen shot: Game\Screenshots\screenshot
 
   sys_spec = 4
 
 
 
Screen shot: Game\Screenshots\screenshot.jpg
 
   sys_spec = 4
 
 
Screen shot: Game\Screenshots\screenshot.tga
 
   sys_spec = 4
 
 
Warning: Captured frame cannot be saved as "tga" format is not supported!
 
Screen shot: Game\Screenshots\screenshot.hdr
 
   sys_spec = 4
 
 
Warning: Captured frame cannot be saved as "hdr" format is not supported!
 
Screen shot: Game\Screenshots\screenshot.bmp
 
   sys_spec = 4


History

  • 4/20/2009 - added by Avatar Reality
  • 4/21/2009 - added return value
Problems with this wiki page? Contact us either by: Support Email or Support Ticket System

Blue Mars Guidebook Privacy Policy
Blue Mars Guidebook Community Guidelines

Personal tools