ctrlMapWorldToScreen: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "<code>([^ ]*)\[\[([a-zA-Z0-9_]+)\]\]([^ ]*)<\/code>" to "<code>$1$2$3</code>") |
Lou Montana (talk | contribs) m (Text replacement - "<code>([^ ]*)\[\[([a-zA-Z0-9_]+)\]\]([^ ]*)<\/code>" to "<code>$1$2$3</code>") |
||
Line 30: | Line 30: | ||
|x1= <code>_screenCoord = _control ctrlMapWorldToScreen _worldCoord;</code> | |x1= <code>_screenCoord = _control ctrlMapWorldToScreen _worldCoord;</code> | ||
|x2= <code>_screenCoord = _control ctrlMapWorldToScreen | |x2= <code>_screenCoord = _control ctrlMapWorldToScreen position [[player]];</code> | ||
|seealso= [[ctrlMapScreenToWorld]] [[posWorldToScreen]] | |seealso= [[ctrlMapScreenToWorld]] [[posWorldToScreen]] |
Revision as of 11:01, 12 May 2022
Description
- Description:
- Converts world coordinates into map screen coordinates. This command is identical to posWorldToScreen.
- Groups:
- GUI Control - Map
Syntax
- Syntax:
- control ctrlMapWorldToScreen 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:
- ctrlMapScreenToWorld posWorldToScreen
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
- Posted on June 16, 2010
- 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.
Categories:
- Scripting Commands
- Introduced with Armed Assault version 1.05
- ArmA: Armed Assault: New Scripting Commands
- ArmA: Armed Assault: Scripting Commands
- Arma 2: Scripting Commands
- Arma 2: Operation Arrowhead: Scripting Commands
- Take On Helicopters: Scripting Commands
- Arma 3: Scripting Commands
- Command Group: GUI Control - Map