Difference between revisions of "mapGridPosition"

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " {2,}\}\}" to " }}")
 
(27 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Command|= Comments
+
{{Command
____________________________________________________________________________________________
 
  
| arma2 |= Game name
+
| arma2
  
|1.04|= Game version
+
|1.04
____________________________________________________________________________________________
 
  
| Returns the map grid position of an object or position. The format is determined by the Grid format specified in the CfgWorlds for the current world. Eg: "024577" or "De82" or similar. |= Description
+
|gr1= Positions
____________________________________________________________________________________________
 
  
| '''mapGridPosition''' param |= Syntax
+
|gr2= Map
  
|p1= param: [[Object]] or [[Position]] - determines reference position |= PARAMETER1
+
| Returns the map grid position of an object or position.<br>
 +
The format is determined by the Grid format specified in the CfgWorlds for the current world. Eg: "024577" or "De82" or similar.
  
| [[String]] - grid position |= RETURNVALUE
+
| [[mapGridPosition]] param
  
 +
|p1= param: [[Object]] or [[Position]] - determines reference position
  
|x1= <pre>_gridPos = mapGridPosition player</pre> |= EXAMPLE1
+
| [[String]] - grid position
  
|x2= <pre>_gridPos = mapGridPosition getPos player</pre> |= EXAMPLE2
+
|x1= <code>_gridPos = [[mapGridPosition]] [[player]];</code>
  
____________________________________________________________________________________________
+
|x2= <code>_gridPos = [[mapGridPosition]] [[getPos]] [[player]];</code>
  
| |= SEEALSO
+
| [[BIS_fnc_gridToPos]], [[BIS_fnc_posToGrid]]
 
 
|  |= MPBEHAVIOUR
 
____________________________________________________________________________________________
 
 
}}
 
}}
  
<h3 style='display:none'>Notes</h3>
 
<dl class='command_description'>
 
<!-- Note Section BEGIN -->
 
  
<!-- Note Section END -->
 
</dl>
 
  
<h3 style='display:none'>Bottom Section</h3>
+
{{GameCategory|arma2|Scripting Commands}}
[[Category:ArmA 2: New Scripting Commands List|{{uc:{{PAGENAME}}}}]]
+
{{GameCategory|arma3|Scripting Commands}}
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]
+
{{GameCategory|tkoh|Scripting Commands}}
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
 
[[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]]
 
 
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
 
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]

Latest revision as of 00:24, 19 January 2021

Introduced with Arma 2 version 1.041.04
Hover & click on the images for descriptions

Description

Description:
Returns the map grid position of an object or position.
The format is determined by the Grid format specified in the CfgWorlds for the current world. Eg: "024577" or "De82" or similar.

Syntax

Syntax:
mapGridPosition param
Parameters:
param: Object or Position - determines reference position
Return Value:
String - grid position

Examples

Example 1:
_gridPos = mapGridPosition player;
Example 2:
_gridPos = mapGridPosition getPos player;

Additional Information

See also:
BIS_fnc_gridToPosBIS_fnc_posToGrid
Groups:
PositionsMap

Notes

i
Only post proven facts here. Report bugs on the Feedback Tracker and discuss on the Arma Discord or on the Forums.