posWorldToScreen: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\[\[Category:[ _]?Scripting[ _]Commands[ _]Take[ _]On[ _]Helicopters(\|.*)?\]\]" to "{{GameCategory|tkoh|Scripting Commands}}")
m (Text replacement - "_{10,} " to "")
Line 1: Line 1:
{{Command|Comments=
{{Command|Comments=
____________________________________________________________________________________________


| arma1 |Game name=
| arma1 |Game name=
Line 9: Line 8:


|gr2= Positions |GROUP2=
|gr2= Positions |GROUP2=
____________________________________________________________________________________________


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


| map '''posWorldToScreen''' position |SYNTAX=
| map '''posWorldToScreen''' position |SYNTAX=
Line 22: Line 19:
| [[Array]] - screen coordinates in format [x, y] |RETURNVALUE=
| [[Array]] - screen coordinates in format [x, y] |RETURNVALUE=


____________________________________________________________________________________________
   
   
|x1= <code>_screenCoord = _control [[posWorldToScreen]] _worldCoord;</code> |EXAMPLE1=
|x1= <code>_screenCoord = _control [[posWorldToScreen]] _worldCoord;</code> |EXAMPLE1=
|x2= <code>_screenCoord = _control [[posWorldToScreen]] [[position]] [[player]];</code> |EXAMPLE2=
|x2= <code>_screenCoord = _control [[posWorldToScreen]] [[position]] [[player]];</code> |EXAMPLE2=
____________________________________________________________________________________________


| [[posScreenToWorld]], [[ctrlMapWorldToScreen]] |SEEALSO=
| [[posScreenToWorld]], [[ctrlMapWorldToScreen]] |SEEALSO=

Revision as of 02:20, 17 January 2021

Hover & click on the images for description

Description

Description:
Converts world coordinates into map screen coordinates. This command is identical to ctrlMapWorldToScreen.
Groups:
GUI Control - MapPositions

Syntax

Syntax:
map posWorldToScreen position
Parameters:
map : 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 posWorldToScreen _worldCoord;
Example 2:
_screenCoord = _control posWorldToScreen position player;

Additional Information

See also:
posScreenToWorldctrlMapWorldToScreen

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