mapCenterOnCamera: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
m (Some wiki formatting)
 
(37 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Command|Comments=
{{RV|type=command
____________________________________________________________________________________________


| arma2 |Game name=
|game1= arma2
|version1= 1.02


|1.02|Game version=
|game2= arma2oa
|version2= 1.50


|gr1= GUI Controls - Map |GROUP1=
|game3= tkoh
____________________________________________________________________________________________
|version3= 1.00


| <tt>ctrl [[mapCenterOnCamera]] enable</tt> syntax enables/disables continuous centering of the main map type control on the camera position. Needs to be executed once.<br>
|game4= arma3
<tt>[[mapCenterOnCamera]] ctrl</tt> syntax centers mini map type control on camera. The command returns world position of the camera. Needs to be executed each frame (preferably inside onDraw EH).|DESCRIPTION=
|version4= 0.50
____________________________________________________________________________________________


| mainmap '''mapCenterOnCamera''' enable |SYNTAX=
|gr1= GUI Control - Map


|p1= mainmap: [[Control]] |PARAMETER1=
|descr= The main syntax enables/disables continuous centering of the main map type control on the camera position. Needs to be executed once.<br>
The alternative syntax centers mini map type control on camera. Needs to be executed each frame (preferably inside an {{hl|onDraw}} event handler).


|p2= enable: [[Boolean]] |PARAMETER2=
|s1= mainmap [[mapCenterOnCamera]] enable


| [[Nothing]] |RETURNVALUE=
|p1= mainmap: [[Control]]


| s2= '''mapCenterOnCamera''' minimap {{since|arma3|1.47|y}} |SYNTAX2=
|p2= enable: [[Boolean]]


|p21= minimap: [[Control]] |PARAMETER21=
|r1= [[Nothing]]


| r2= [[Array]] - [[PositionWorld]] of the map center (camera focus object) in render scope |RETURNVALUE2=
|s2= [[mapCenterOnCamera]] minimap


|x1= <code>{{cc|--- Minimap update}}
|s2since= arma3 1.48
(([[uiNamespace]] [[getVariable]] "BIS_UAV_DISPLAY") [[displayCtrl]] 112410) [[mapCenterOnCamera]] [[true]];</code>|EXAMPLE1=  


____________________________________________________________________________________________
|p21= minimap: [[Control]]


| [[ctrlMapAnimAdd]], [[ctrlMapAnimCommit]], [[getPosWorld]] |SEEALSO=
|r2= [[Array]] in format [[Position#PositionASL|PositionASL]] of the map center (camera focus object's '''model centre'''<nowiki/>'s position (see [[getPosWorld]])) in render scope
}}


<h3 style='display:none'>Notes</h3>
|x1= <sqf>
<dl class='command_description'>
// --- Minimap update
<!-- Note Section BEGIN -->
((uiNamespace getVariable "BIS_UAV_DISPLAY") displayCtrl 112410) mapCenterOnCamera true;
</sqf>


<!-- Note Section END -->
|seealso= [[ctrlMapAnimAdd]] [[ctrlMapAnimCommit]] [[getPosWorld]]
</dl>
}}
 
<h3 style='display:none'>Bottom Section</h3>
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Take On Helicopters|{{uc:{{PAGENAME}}}}]]

Latest revision as of 10:34, 19 April 2024

Hover & click on the images for description

Description

Description:
The main syntax enables/disables continuous centering of the main map type control on the camera position. Needs to be executed once.
The alternative syntax centers mini map type control on camera. Needs to be executed each frame (preferably inside an onDraw event handler).
Groups:
GUI Control - Map

Syntax

Syntax:
mainmap mapCenterOnCamera enable
Parameters:
mainmap: Control
enable: Boolean
Return Value:
Nothing

Alternative Syntax

Syntax:
mapCenterOnCamera minimap
Parameters:
minimap: Control
Return Value:
Array in format PositionASL of the map center (camera focus object's model centre's position (see getPosWorld)) in render scope

Examples

Example 1:
// --- Minimap update ((uiNamespace getVariable "BIS_UAV_DISPLAY") displayCtrl 112410) mapCenterOnCamera true;

Additional Information

See also:
ctrlMapAnimAdd ctrlMapAnimCommit getPosWorld

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