|
|
(13 intermediate revisions by 3 users not shown) |
Line 1: |
Line 1: |
− | <div class="toccolours mw-collapsible mw-collapsed" style="background: #f0f0f0; border: 1px dashed darkgrey" width="100%">
| + | #REDIRECT [[Global Command: createScreenshot]] |
− | <b>Command History</b>
| |
− | <div class="mw-collapsible-content">
| |
− | <div style="background:#ebebeb" width="100%">Available since <span style="color:orange">v3.7</span></div>
| |
− | </div></div>
| |
− | | |
− | | |
− | A user can create a screenshot to be used for the next save game or to save into an external folder as a .png/jpg file.
| |
− | | |
− | | |
− | Syntax:
| |
− | <syntaxhighlight>
| |
− | createScreenshot("filename", {flags=1, clear=true|false}) | |
− | </syntaxhighlight>
| |
− | | |
− | | |
− | Example 1: basic save screenshot to x folder!
| |
− | <syntaxhighlight>
| |
− | -- save to "screenshots" folder as "filename.png"!
| |
− | createScreenshot("screenshots/filename.png")
| |
− | </syntaxhighlight>
| |
− | | |
− | Example 2: save screenshot to x folder & include time stamp!
| |
− | <syntaxhighlight>
| |
− | --[[ add this as an execute script action inside of a key input ...
| |
− | change "filename to whatever you like! --]]
| |
− | | |
− | -- save to "screenshots" folder as "filename_date(yyyy/mm/dd)_time(hh:mm:ss).png"!
| |
− | local time = os.date("%Y-%m-%d_%Hh-%Mm-%Ss")
| |
− | createScreenshot("screenshots/filename_" .. time .. ".png")
| |
− | | |
− | -- save to "screenshots" folder as "date(yyyy/mm/dd)_time(hh:mm:ss).png
| |
− | createScreenshot("screenshots/" .. time .. ".png")
| |
− | </syntaxhighlight>
| |
− | | |
− | | |
− | | |
− | <b><u>Arguments</u></b>
| |
− | | |
− | <b>filename</b>: "string" <br/>
| |
− | If specified the screenshot will be saved to the given path. Otherwise the screenshot will be used for the next savegame(s), as long as a new screenshot is created or the current screenshot is cleared. If a screenshot for a savegame was created before it will be overwritten by the new screenshot.
| |
− | | |
− | | |
− | <b><u>Flags</u></b>
| |
− | | |
− | <b>clr/clear</b> <br/>
| |
− | If true the screenshot will be cleared. Default value is false. If the screenshot is cleared it will be generated automatically by the engine again, everytime the scene is changed from a playable scene to a menu.
| |
− | | |
− | | |
− | <b><u>Return</u></b>
| |
− | | |
− | none
| |
− | {{i18n|CreateScreenshot}}
| |