BIS fnc gridToPos: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (1 revision imported: BIS Functions update 2/7)
(Page filling)
Line 1: Line 1:
{{Function|= Comments
{{Function|= Comments
____________________________________________________________________________________________
____________________________________________________________________________________________
Line 8: Line 7:
____________________________________________________________________________________________
____________________________________________________________________________________________


| <pre>/*
| Converts grid coordinates to world position.
Author: Karel Moricky
{{Important|
 
Correct results outside of the map area are not guaranteed.}} |= Description
Description:
____________________________________________________________________________________________
Converts grid coordinates to world position.
Correct results outside of the map area are not guaranteed.


Parameter(s):
| gridPosition call [[BIS_fnc_gridToPos]] |= Syntax
0: STRING - grid returned by mapGridPosition command


Returns:
|p1= gridPosition: [[String]] - (Optional, default {{Inline code|[[mapGridPosition]] [[position]] [[cameraOn]]}}) accepts both "024577" or "De82" format |= Parameter 1
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
| [[Array]] - to format <nowiki>[</nowiki>[gridX, gridY], [gridWidth, gridHeight]] (all of [[Number]] type) |= Return value
____________________________________________________________________________________________
____________________________________________________________________________________________


| <!-- [] call [[BIS_fnc_gridToPos]]; --> |= Syntax
|x1= <code>_realPosition = "183221" [[call]] [[BIS_fnc_gridToPos]];</code> |= Example 1
|p1= |= Parameter 1
 
| |= Return value
____________________________________________________________________________________________


|x1= <code></code> |=  
|x2= <code>_realPosition = "He11" [[call]] [[BIS_fnc_gridToPos]];</code> |= Example 2
____________________________________________________________________________________________
____________________________________________________________________________________________


| |= See also
| [[mapGridPosition]] |= See also
 
}}
}}



Revision as of 18:10, 8 May 2018

Hover & click on the images for description

Description

Description:
Converts grid coordinates to world position.
Correct results outside of the map area are not guaranteed.
Execution:
call
Groups:
Uncategorised

Syntax

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

Examples

Example 1:
_realPosition = "183221" call BIS_fnc_gridToPos;
Example 2:
_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

Notes

Bottom Section