posWorldToScreen: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - " <h3 style="display:none">Notes</h3> <dl class="command_description"> <!-- Note Section BEGIN --> <!-- Note Section END --> </dl> " to "") |
Lou Montana (talk | contribs) m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments( \("local" or "global"\))?|Effects|Multiplayer Effects( \("local" or "global"\))?|Multiplayer Exe...) |
||
Line 1: | Line 1: | ||
{{Command | {{Command | ||
| arma1 | | arma1 | ||
|1.00 | |1.00 | ||
|gr1= GUI Control - Map | |gr1= GUI Control - Map | ||
|gr2= Positions | |gr2= Positions | ||
| Converts world coordinates into map screen coordinates. This command is identical to [[ctrlMapWorldToScreen]]. | | Converts world coordinates into map screen coordinates. This command is identical to [[ctrlMapWorldToScreen]]. | ||
| map '''posWorldToScreen''' position | | map '''posWorldToScreen''' position | ||
|p1= map : [[Control]] - map control | |p1= map : [[Control]] - map control | ||
|p2= position : [[Array]] - world position in format [[Position2D]] or [[Position3D]] | |p2= position : [[Array]] - world position in format [[Position2D]] or [[Position3D]] | ||
| [[Array]] - screen coordinates in format [x, y] | | [[Array]] - screen coordinates in format [x, y] | ||
|x1= <code>_screenCoord = _control [[posWorldToScreen]] _worldCoord;</code> | |x1= <code>_screenCoord = _control [[posWorldToScreen]] _worldCoord;</code> | ||
|x2= <code>_screenCoord = _control [[posWorldToScreen]] [[position]] [[player]];</code> | |x2= <code>_screenCoord = _control [[posWorldToScreen]] [[position]] [[player]];</code> | ||
| [[posScreenToWorld]], [[ctrlMapWorldToScreen]] | | [[posScreenToWorld]], [[ctrlMapWorldToScreen]] | ||
}} | }} |
Revision as of 01:12, 18 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