BIS fnc strategicMapOpen: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (added example (WIP, will be formatted later))
(page filling)
Line 8: Line 8:
____________________________________________________________________________________________
____________________________________________________________________________________________


| <pre>/*
| Creates an strategic map.
[[File:A3 strategicMap.jpg|center|600px]] |= Description
____________________________________________________________________________________________
 
| [display,pos,listMissions,listORBAT,listMarkers,listImages,weather,night,scale,simulation,label,missionName,missionIcon] call [[BIS_fnc_StrategicMapOpen]] |= Syntax
 
|p1= display: [[Display]] - Parent display. When empty, mission display is used.|= Parameter 1
 
|p2= pos: [[Position]] - Default view position in format [x,y,y] or [x,y]|= Parameter 2
 
|p3= listMissions: [[Array]] - List of missions, each [[Array]] in format:
*0: [[Position]] - 2D or 3D position of mission
*1: [[Code]] - Expression executed when user clicks on mission icon
*2: [[String]] - Mission name
*3: [[String]] - Short description
*4: [[String]] - Name of mission's player
*5: [[String]] - Path to overview image
*6: [[Number]] - Size multiplier for overview image
*7: [[Array]] - Paramters for on-click action. Can be accessed in code with {{Inline code|_this # 9}}|= Parameter 3
 
|p4= listORBAT: [[Array]] - List of ORBAT, each [[Array]] in format:
*0: [[Position]] - 2D or 3D position
*1: [[Config]] - Preview CfgORBAT group
*2: [[Config]] - Topmost displayed CfgORBAT group
*3: [[Array]] of [[String|strings]] - List of allowed tags
*4: [[String]] - Name of mission's player
*5: [[Number]] - Maximum number of displayed tiers|= Parameter 4
 
|p5= listMarkers: [[Array]] of [[String|strings]] - List of markers revealed in strategic map (will be hidden when map is closed)|= Parameter 5
 
|p6= listImages: [[Array]] - List of custom images, each [[Array]] in format:
*0: [[String]] - Texture path
*1: [[Array]] - Colour in format [R,G,B,A]
*2: [[Position]] - Image position
*3: [[Number]] - Image width in meters
*4: [[Number]] - Image height in meters
*5: [[Number]] - Image angle in degrees
*6: [[String]] - Text displayed next to the image
*7: [[Boolean]] - [[true|True]] to show shadow|= Parameter 6
 
 
|p7= weather: [[Number]] - Overcast, from 0 - 1, where 1 means cloudy weather|= Parameter 7


Description:
|p8= night: [[Boolean]] - [[true|True]] for night version of strategic map (darker with blue tone)|= Parameter 8
Open strategic map.


Parameter(s):
|p9= scale: [[Number]] - Default map scale coeficient (1 is automatic scale)|= Parameter 9
0: DISPLAY - parent display. When empty, mission display is used.
1: ARRAY - default view position in format [x,y,y] or [x,y]
2: ARRAY - list of missions in format:
0: ARRAY - mission position in format [x,y,y] or [x,y]
1: CODE - expression executed when user clicks on mission icon
2: STRING - mission name
3: STRING - short description
4: STRING - name of mission's player
5: STRING - path to overview image
6: NUMBER - size multiplier, 1 means default size
7: ARRAY - parameters for the -on click- code; referenced from the script as (_this select 9)
3: ARRAY - list of ORBAT groups in format:
0: ARRAY - group position in format [x,y,y] or [x,y]
1: CONFIG - preview CfgORBAT group
2: CONFIG - topmost displayed CfgORBAT group
3: ARRAY - list of allowed tags
4: NUMBER - maximum number of displayed tiers
4: ARRAY - list of markers revealed in strategic map (will be hidden when map is closed)
5: ARRAY - list of custom images in format:
0: STRING - texture path
1: ARRAY - color in format [R,G,B,A]
2: ARRAY - image position
3: NUMBER - image width (in metres)
4: NUMBER - image height (in metres)
5: NUMBER - image angle (in degrees)
6: STRING - text displayed next to the image
7: BOOL - true to display shadow
6: NUMBER - value in range <0-1> defining weather on strategic map (i.e. density of clouds)
7: BOOL - true for night version of strategic map (darker with blue tone)
8: NUMBER - default map scale coeficient (1 is automatic scale)
9: BOOL - true to enable simulation while the map is opened (default: false)
      10: STRING - bottom bar action label text (default: "Select a mission")
      11: BOOL - true to show icon label as a mission name (default: true)
      12: STRING - path to mission icon texture (default: "\A3\Ui_f\data\Map\GroupIcons\badge_rotate_%1_gs.paa")
      %1 - animation frame from 0-6 (optional)
      %2 - index from 1-9 (optional)


Returns:
|p10= simulation: [[Boolean]]] - (Optional, default [[false]] [[True]] to enable simulation while the map is opened|= Parameter 10
DISPLAY - RscDisplayStrategicMap
 
*/
|p11= label: [[String]] - (Optional, default "Select a mission") Bottom bar action label text|= Parameter 11
</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |= Description
____________________________________________________________________________________________


| <!-- [] call [[BIS_fnc_StrategicMapOpen]]; --> |= Syntax
|p12= missionName: [[Boolean]] - (Optional, default [[true]]) [[true|True]] to show icon label as a mission name|= Parameter 12


|p1= |= Parameter 1
|p13= missionIcon: [[String]] - (Optional, default "\A3\Ui_f\data\Map\GroupIcons\badge_rotate_%1_gs.paa") Path to mission icon texture
*%1 - Aanimation frame from 0-6 (optional)
*%2 - Index from 1-9 (optional)|= Parameter 13


| |= Return value
| [[Display]] - RscDisplayStrategicMap |= Return value
____________________________________________________________________________________________
____________________________________________________________________________________________


|x1= <code>[
|x1= <code>[
findDisplay 46,
[[findDisplay]] 46,
[2000,2000,0],
[2000,2000,0],
[
[
[
[
[2000,2000,0],
[2000,2000,0],
{systemChat format ["%1",name ((_this # 9) # 0)]},
{[[systemChat]] [[format]] ["%1",name ((_this # 9) # 0)]},
"1st Mission",
"1st Mission",
"This is mission one",
"This is mission one",
Line 76: Line 80:
"\A3\Data_F_Exp\Logos\arma3_exp_icon_ca.paa",
"\A3\Data_F_Exp\Logos\arma3_exp_icon_ca.paa",
1.5,
1.5,
[player]
[ [[player]] ]
],
],
[
[
[1000,1000,0],
[1000,1000,0],
{systemChat format ["%1",name ((_this # 9) # 0)]},
{[[systemChat]] format ["%1",name ((_this # 9) # 0)]},
"2nd Mission",
"2nd Mission",
"This is mission two",
"This is mission two",
Line 86: Line 90:
"\A3\Data_F_Argo\Logos\arma3_argo_logoTitle_ca.paa",
"\A3\Data_F_Argo\Logos\arma3_argo_logoTitle_ca.paa",
1.5,
1.5,
[player]
[ [[player]] ]
]
]
],
],
Line 92: Line 96:
[
[
[3000,3000,0],
[3000,3000,0],
configfile >> "CfgORBAT" >> "BIS" >> "B_1_A_1_2",
[[configFile]] >> "CfgORBAT" >> "BIS" >> "B_1_A_1_2",
configfile >> "CfgORBAT" >> "BIS" >> "B_1",
[[configFile]] >> "CfgORBAT" >> "BIS" >> "B_1",
[],
[],
10
10
Line 111: Line 115:
0,
0,
"Arma 3 Logo",
"Arma 3 Logo",
true
[[true]]
]
]
],
],
0,
0,
false,
[[false]],
1,
1,
true,
[[true]],
"Strategic Map Example",
"Strategic Map Example",
false,
[[false]],
"\A3\Ui_f\data\Logos\arma3_white_ca.paa"
"\A3\Ui_f\data\Logos\arma3_white_ca.paa"
] call BIS_fnc_StrategicMapOpen;</code> |=  
] [[call]] [[BIS_fnc_StrategicMapOpen]];</code> |=
____________________________________________________________________________________________
______________
 
| |= See also


| [[ORBAT Viewer]], [[BIS_fnc_ORBATAddGroupOverlay]], [[BIS_fnc_ORBATAnimate]], [[BIS_fnc_ORBATConfigPreview]], [[BIS_fnc_ORBATGetGroupParams]], [[BIS_fnc_ORBATOpen]], [[BIS_fnc_ORBATRemoveGroupOverlay]], [[BIS_fnc_ORBATSetGroupFade]], [[BIS_fnc_ORBATSetGroupParams]], [[BIS_fnc_ORBATTooltip]], [[BIS_fnc_StrategicMapMouseButtonClick]], [[BIS_fnc_StrategicMapAnimate]]  |= See also
}}
}}



Revision as of 12:21, 27 May 2018


Hover & click on the images for description

Description

Description:
Creates an strategic map.
A3 strategicMap.jpg
Execution:
call
Groups:
Uncategorised

Syntax

Syntax:
[display,pos,listMissions,listORBAT,listMarkers,listImages,weather,night,scale,simulation,label,missionName,missionIcon] call BIS_fnc_StrategicMapOpen
Parameters:
display: Display - Parent display. When empty, mission display is used.
pos: Position - Default view position in format [x,y,y] or [x,y]
listMissions: Array - List of missions, each Array in format:
  • 0: Position - 2D or 3D position of mission
  • 1: Code - Expression executed when user clicks on mission icon
  • 2: String - Mission name
  • 3: String - Short description
  • 4: String - Name of mission's player
  • 5: String - Path to overview image
  • 6: Number - Size multiplier for overview image
  • 7: Array - Paramters for on-click action. Can be accessed in code with _this # 9
listORBAT: Array - List of ORBAT, each Array in format:
  • 0: Position - 2D or 3D position
  • 1: Config - Preview CfgORBAT group
  • 2: Config - Topmost displayed CfgORBAT group
  • 3: Array of strings - List of allowed tags
  • 4: String - Name of mission's player
  • 5: Number - Maximum number of displayed tiers
listMarkers: Array of strings - List of markers revealed in strategic map (will be hidden when map is closed)
listImages: Array - List of custom images, each Array in format:
  • 0: String - Texture path
  • 1: Array - Colour in format [R,G,B,A]
  • 2: Position - Image position
  • 3: Number - Image width in meters
  • 4: Number - Image height in meters
  • 5: Number - Image angle in degrees
  • 6: String - Text displayed next to the image
  • 7: Boolean - True to show shadow
weather: Number - Overcast, from 0 - 1, where 1 means cloudy weather
night: Boolean - True for night version of strategic map (darker with blue tone)
scale: Number - Default map scale coeficient (1 is automatic scale)
simulation: Boolean] - (Optional, default false True to enable simulation while the map is opened
label: String - (Optional, default "Select a mission") Bottom bar action label text
missionName: Boolean - (Optional, default true) True to show icon label as a mission name
missionIcon: String - (Optional, default "\A3\Ui_f\data\Map\GroupIcons\badge_rotate_%1_gs.paa") Path to mission icon texture
  • %1 - Aanimation frame from 0-6 (optional)
  • %2 - Index from 1-9 (optional)
Return Value:
Display - RscDisplayStrategicMap

Examples

Example 1:
[ findDisplay 46, [2000,2000,0], [ [ [2000,2000,0], {systemChat format ["%1",name ((_this # 9) # 0)]}, "1st Mission", "This is mission one", "Name of mission's player", "\A3\Data_F_Exp\Logos\arma3_exp_icon_ca.paa", 1.5, [ player ] ], [ [1000,1000,0], {systemChat format ["%1",name ((_this # 9) # 0)]}, "2nd Mission", "This is mission two", "Name of mission's player", "\A3\Data_F_Argo\Logos\arma3_argo_logoTitle_ca.paa", 1.5, [ player ] ] ], [ [ [3000,3000,0], configFile >> "CfgORBAT" >> "BIS" >> "B_1_A_1_2", configFile >> "CfgORBAT" >> "BIS" >> "B_1", [], 10 ] ], [ "marker_1", "marker_2" ], [ [ "\A3\Ui_f\data\Logos\arma3_white_ca.paa", [0,0,0,1], [4000,4000,0], 8, 8, 0, "Arma 3 Logo", true ] ], 0, false, 1, true, "Strategic Map Example", false, "\A3\Ui_f\data\Logos\arma3_white_ca.paa" ] call BIS_fnc_StrategicMapOpen;

Additional Information

See also:
ORBAT ViewerBIS_fnc_ORBATAddGroupOverlayBIS_fnc_ORBATAnimateBIS_fnc_ORBATConfigPreviewBIS_fnc_ORBATGetGroupParamsBIS_fnc_ORBATOpenBIS_fnc_ORBATRemoveGroupOverlayBIS_fnc_ORBATSetGroupFadeBIS_fnc_ORBATSetGroupParamsBIS_fnc_ORBATTooltipBIS_fnc_StrategicMapMouseButtonClickBIS_fnc_StrategicMapAnimate

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note

Notes

Bottom Section