Arma 3 Scripting

ctrlMapWorldToScreen

  • Arma 3 v0.50
  • First in Armed Assault v1.05

Command · Markdown · JSON · original wiki page

Description

Converts world coordinates into map screen coordinates. This command is identical to posWorldToScreen.

Syntax

control ctrlMapWorldToScreen position

Parameters:

Returns: Position2D - screen coordinates in format [x, y]

Examples

Example 1

_screenCoord = _control ctrlMapWorldToScreen _worldCoord;

Example 2

_screenCoord = _control ctrlMapWorldToScreen position player;

See also

ctrlMapScreenToWorld · posWorldToScreen

Community notes

.kju

This command 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.