BIS fnc gridToPos: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Generated by BIS_fnc_exportFunctionsToWiki)
 
m (Some wiki formatting)
 
(33 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{RV|type=function


{{Function|= Comments
|game1= arma3
____________________________________________________________________________________________
|version1= 1.00


| arma3 |= Game name
|gr1= Positions


|1.00|= Game version
|descr= Converts grid coordinates to world position.
____________________________________________________________________________________________
{{Feature|important|
 
* Correct results outside of the map area are not guaranteed.
| <pre>/*
* Does not work on machines with no UI like [[Arma 3: Dedicated Server|Dedicated Server]] or [[Arma 3: Headless Client|Headless Client]] - see [[hasInterface]].
Author: Karel Moricky
}}
 
Description:
Converts grid coordinates to world position.
Correct results outside of the map area are not guaranteed.
 
Parameter(s):
0: STRING - grid returned by mapGridPosition command
 
Returns:
ARRAY in format [[gridX:Number,gridY:Number],[gridWidth:Number,gridHeight:Number]]
*/


</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |= Description
|s1= gridPosition call [[BIS_fnc_gridToPos]]
____________________________________________________________________________________________


| <!-- [] call [[BIS_fnc_gridToPos]]; --> |= Syntax
|p1= gridPosition: [[String]] - (Optional, default <sqf inline>mapGridPosition position cameraOn</sqf>) accepts both "024577" or "De82" format
|p1= |= Parameter 1


| |= Return value
|r1= [[Array]] of [[Number]]s in format [<nowiki/>[gridX, gridY], [gridWidth, gridHeight]]
____________________________________________________________________________________________


|x1= <code></code> |=
|x1= <sqf>private _realPosition = "183221" call BIS_fnc_gridToPos;</sqf>
____________________________________________________________________________________________


| |= See also
|x2= <sqf>private _realPosition = "He11" call BIS_fnc_gridToPos;</sqf>


|seealso= [[mapGridPosition]]
}}
}}
<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- Note Section BEGIN -->
<!-- Note Section END -->
</dl>
<h3 style="display:none">Bottom Section</h3>
[[Category:Function Group: Misc|{{uc:gridToPos}}]]
[[Category:Functions|{{uc:gridToPos}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:gridToPos}}]]

Latest revision as of 13:57, 30 July 2022

Hover & click on the images for description

Description

Description:
Converts grid coordinates to world position.
Execution:
call
Groups:
Positions

Syntax

Syntax:
gridPosition call BIS_fnc_gridToPos
Parameters:
gridPosition: String - (Optional, default mapGridPosition position cameraOn) accepts both "024577" or "De82" format
Return Value:
Array of Numbers in format [[gridX, gridY], [gridWidth, gridHeight]]

Examples

Example 1:
private _realPosition = "183221" call BIS_fnc_gridToPos;
Example 2:
private _realPosition = "He11" call BIS_fnc_gridToPos;

Additional Information

See also:
mapGridPosition

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