BIS fnc gridToPos: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "code>_([a-zA-Z0-9_]+) = " to "code>private _$1 = ")
m (Some wiki formatting)
Line 12: Line 12:
|s1= gridPosition call [[BIS_fnc_gridToPos]]
|s1= gridPosition call [[BIS_fnc_gridToPos]]


|p1= gridPosition: [[String]] - (Optional, default {{ic|[[mapGridPosition]] [[position]] [[cameraOn]]}}) accepts both "024577" or "De82" format
|p1= gridPosition: [[String]] - (Optional, default <sqf inline>mapGridPosition position cameraOn</sqf>) accepts both "024577" or "De82" format


|r1= [[Array]] - to format [<nowiki/>[gridX, gridY], [gridWidth, gridHeight]] (all of [[Number]] type)
|r1= [[Array]] of [[Number]]s in format [<nowiki/>[gridX, gridY], [gridWidth, gridHeight]]


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


|x2= <code>[[private]] _realPosition = "He11" [[call]] [[BIS_fnc_gridToPos]];</code>
|x2= <sqf>private _realPosition = "He11" call BIS_fnc_gridToPos;</sqf>


|seealso= [[mapGridPosition]]
|seealso= [[mapGridPosition]]
}}
}}

Revision as of 15:47, 1 July 2022

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:
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