ctrlMapWorldToScreen: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "|= Game name" to "|Game name=")
Line 7: Line 7:
____________________________________________________________________________________________
____________________________________________________________________________________________


| Converts world coordinates into map screen coordinates. This command is identical to [[posWorldToScreen]]. |DESCRIPTION=
| Converts world coordinates into map screen coordinates. This command is identical to [[posWorldToScreen]]. |DESCRIPTION=
____________________________________________________________________________________________
____________________________________________________________________________________________


| control '''posWorldToScreen''' position |SYNTAX=
| control [[posWorldToScreen]] position |SYNTAX=


|p1= control : [[Control]] - map control|PARAMETER1=
|p1= control : [[Control]] - map control|PARAMETER1=


|p2= position : [[Array]] - world position in format [[Position2D]] or [[Position3D]] |PARAMETER1=
|p2= position : [[Array]] - world position in format [[Position2D]] or [[Position3D]] |PARAMETER2=


| [[Array]] - screen coordinates in format [x, y] |RETURNVALUE=
| [[Array]] - screen coordinates in format [x, y] |RETURNVALUE=
Line 20: Line 20:
   
   
|x1= <code>_screenCoord = _control [[ctrlMapWorldToScreen]] _worldCoord;</code> |EXAMPLE1=
|x1= <code>_screenCoord = _control [[ctrlMapWorldToScreen]] _worldCoord;</code> |EXAMPLE1=
|x2= <code>_screenCoord = _control [[ctrlMapWorldToScreen]] [[position]] [[player]];</code> |EXAMPLE2=
|x2= <code>_screenCoord = _control [[ctrlMapWorldToScreen]] [[position]] [[player]];</code> |EXAMPLE2=
____________________________________________________________________________________________
____________________________________________________________________________________________


| [[ctrlMapScreenToWorld]], [[posWorldToScreen]] |SEEALSO=
| [[ctrlMapScreenToWorld]], [[posWorldToScreen]] |SEEALSO=
}}
}}


Line 34: Line 33:


<dd class="notedate">Posted on June 16, 2010
<dd class="notedate">Posted on June 16, 2010
<dt class="note">'''[[User:kju|kju]]'''<dd class="note">''Notes:''
<dt class="note">[[User:kju|kju]]
It returns a 2d array with the position on the active map display. Say the return [0.5.0.5] would mean that your input 3d world position, like [500,1000], is currently at the center of the active map display.<br>
<dd class="note">
It returns a 2D array with the position on the active map display. Say the return [0.5.0.5] would mean that your input 3d world position, like [500,1000], is currently at the center of the active map display.<br>
In other words you can make the actual world position (of an object for example), relative to your active map display.
In other words you can make the actual world position (of an object for example), relative to your active map display.


<!-- Note Section END -->
<!-- Note Section END -->

Revision as of 22:19, 3 September 2019

-wrong parameter ("Arma") defined!-1.05
Hover & click on the images for description

Description

Description:
Converts world coordinates into map screen coordinates. This command is identical to posWorldToScreen.
Groups:
Uncategorised

Syntax

Syntax:
control posWorldToScreen position
Parameters:
control : Control - map control
position : Array - world position in format Position2D or Position3D
Return Value:
Array - screen coordinates in format [x, y]

Examples

Example 1:
_screenCoord = _control ctrlMapWorldToScreen _worldCoord;
Example 2:
_screenCoord = _control ctrlMapWorldToScreen position player;

Additional Information

See also:
ctrlMapScreenToWorldposWorldToScreen

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

Posted on June 16, 2010
kju
It returns a 2D array with the position on the active map display. Say the return [0.5.0.5] would mean that your input 3d world position, like [500,1000], is currently at the center of the active map display.
In other words you can make the actual world position (of an object for example), relative to your active map display.

Bottom Section