OutPicture: Difference between revisions
Appearance
Ozdeadmeat (talk | contribs) outPicture – created via PowerShell script (2025-11-11T21:12:08Z) Tag: Recreated |
Ozdeadmeat (talk | contribs) m outPicture – created via PowerShell script (2026-06-24T22:26:39Z) |
||
| Line 1: | Line 1: | ||
{{Template:FunctionInfo|fName= outPicture|fDescription= Displays a PNG/JPG file from the mission’s l10n\DEFAULT folder on the player’s HUD for a specified duration, optionally clearing other images and delaying the start. The function supports alignment (left/middle/right, top/middle/bottom), scaling to screen size, and optional clearing of previously displayed pictures.|parentFile= cmm.DCSFunctions.lua|syntax= CMM.outPicture(<string>, <number|nil>, <boolean|nil>, <number|nil>, <number|nil>, <number|nil>, <number|nil>, <number|nil>)|return= nil|returnDesc= The function performs a side‑effect only and returns nothing.|example= CMM.outPicture("battleMap.png", 30, true, 0, 1, 1, 100)|exampleDesc= shows "battleMap.png" centered on screen for 30 s, clearing any other images first|related= |note= FILENAMES NEED TO BE IN THE mapResource file under l10n\DEFAULT in the mission file|envType= CMM|par1= string fileName|reqType1= string|reqName1= fileName|desc1= Name of the image file (e.g., "myMap.png"). The file must be present in l10n\DEFAULT of the mission.|par2= number or nil durationSeconds|optType2= number or nil|optName2= durationSeconds|desc2= How long, in seconds, the picture remains visible. If omitted or nil, it stays until cleared by another call.|par3= boolean or nil clearView|optType3= boolean or nil|optName3= clearView|desc3= When true, removes all other images currently displayed before showing this one.|par4= number or nil startDelay|optType4= number or nil|optName4= startDelay|desc4= Seconds to wait after calling before the image appears (useful for sequencing).|par5= number or nil horizontalAlign|optType5= number or nil|optName5= horizontalAlign|desc5= 0 = left, 1 = center, 2 = right. Defaults to 1 (center).|par6= number or nil verticalAlign|optType6= number or nil|optName6= verticalAlign|desc6= 0 = top, 1 = middle, 2 = bottom. Defaults to | {{Template:FunctionInfo|fName= outPicture|fDescription= Displays a PNG/JPG file from the mission’s l10n\DEFAULT folder on the player’s HUD for a specified duration, optionally clearing other images and delaying the start. The function supports alignment (left/middle/right, top/middle/bottom), scaling to screen size, and optional clearing of previously displayed pictures.|parentFile= cmm.DCSFunctions.lua|syntax= CMM.outPicture(<string>, <number|nil>, <boolean|nil>, <number|nil>, <number|nil>, <number|nil>, <number|nil>, <number|nil>)|return= nil|returnDesc= The function performs a side‑effect only and returns nothing.|example= CMM.outPicture("battleMap.png", 30, true, 0, 1, 1, 100)|exampleDesc= shows "battleMap.png" centered on screen for 30 s, clearing any other images first|related= |note= FILENAMES NEED TO BE IN THE mapResource file under l10n\DEFAULT in the mission file|envType= CMM|par1= string fileName|reqType1= string|reqName1= fileName|desc1= Name of the image file (e.g., "myMap.png"). The file must be present in l10n\DEFAULT of the mission.|par2= number or nil durationSeconds|optType2= number or nil|optName2= durationSeconds|desc2= How long, in seconds, the picture remains visible. If omitted or nil, it stays until cleared by another call.|par3= boolean or nil clearView|optType3= boolean or nil|optName3= clearView|desc3= When true, removes all other images currently displayed before showing this one.|par4= number or nil startDelay|optType4= number or nil|optName4= startDelay|desc4= Seconds to wait after calling before the image appears (useful for sequencing).|par5= number or nil horizontalAlign|optType5= number or nil|optName5= horizontalAlign|desc5= 0 = left, 1 = center, 2 = right. Defaults to 1 (center).|par6= number or nil verticalAlign|optType6= number or nil|optName6= verticalAlign|desc6= 0 = top, 1 = middle, 2 = bottom. Defaults to 0 (top).|par7= number or nil size|optType7= number or nil|optName7= size|desc7= Scale factor relative to screen width; 100 makes the image fill the screen. Default is 100.|par8= number or nil sizeUnits|optType8= number or nil|optName8= sizeUnits|desc8= Units for the size parameter (normally leave as 1).}} | ||
Latest revision as of 12:26, 24 June 2026
| Environment: | Mission Scripting | |
|---|---|---|
| Function: | outPicture | |
| Function Description: | Displays a PNG/JPG file from the mission’s l10n\DEFAULT folder on the player’s HUD for a specified duration, optionally clearing other images and delaying the start. The function supports alignment (left/middle/right, top/middle/bottom), scaling to screen size, and optional clearing of previously displayed pictures. | |
| File Location: | cmm.DCSFunctions.lua | |
| Syntax: | CMM.outPicture( string fileName , number or nil durationSeconds , boolean or nil clearView , number or nil startDelay , number or nil horizontalAlign , number or nil verticalAlign ,number or nil size , number or nil sizeUnits ) | |
| Return Value: | nil | |
| Parameters: | Name | Description |
| fileName | Name of the image file (e.g., "myMap.png"). The file must be present in l10n\DEFAULT of the mission. | |
| durationSeconds | How long, in seconds, the picture remains visible. If omitted or nil, it stays until cleared by another call. | |
| clearView | When true, removes all other images currently displayed before showing this one. | |
| startDelay | Seconds to wait after calling before the image appears (useful for sequencing). | |
| horizontalAlign | 0 = left, 1 = center, 2 = right. Defaults to 1 (center). | |
| verticalAlign | 0 = top, 1 = middle, 2 = bottom. Defaults to 0 (top). | |
| size | Scale factor relative to screen width; 100 makes the image fill the screen. Default is 100. | |
| sizeUnits | Units for the size parameter (normally leave as 1). | |
| Example: | CMM.outPicture("battleMap.png", 30, true, 0, 1, 1, 100) | |
| Example Description: | shows "battleMap.png" centered on screen for 30 s, clearing any other images first | |
| Related Functions: | ||
| Notes: | FILENAMES NEED TO BE IN THE mapResource file under l10n\DEFAULT in the mission file | |