posWorldToScreen: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "\[\[Category:[ _]?Scripting[ _]Commands[ _]Take[ _]On[ _]Helicopters(\|.*)?\]\]" to "{{GameCategory|tkoh|Scripting Commands}}") |
Lou Montana (talk | contribs) 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
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