ctrlMapWorldToScreen: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "<dd class="notedate">Posted on ([^<>]+) " to "<dd class="notedate">Posted on $1</dd> ") |
Lou Montana (talk | contribs) m (Text replacement - ">Posted on June ([0-9]{2})[ a-zA-Z]*, ([0-9]{4})" to ">Posted on $2-06-$1") |
||
(23 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{RV|type=command | {{RV|type=command | ||
| arma1 | |game1= arma1 | ||
|version1= 1.05 | |||
|1. | |game2= arma2 | ||
|version2= 1.00 | |||
|game3= arma2oa | |||
|version3= 1.50 | |||
|game4= tkoh | |||
|version4= 1.00 | |||
|game5= arma3 | |||
|version5= 0.50 | |||
|gr1= GUI Control - Map | |gr1= GUI Control - Map | ||
| Converts world coordinates into map screen coordinates. This command is identical to [[posWorldToScreen]]. | |descr= Converts world coordinates into map screen coordinates. This command is identical to [[posWorldToScreen]]. | ||
| control [[ctrlMapWorldToScreen]] position | |s1= control [[ctrlMapWorldToScreen]] position | ||
|p1= control : [[Control]] - map control | |p1= control : [[Control]] - map control | ||
|p2= position : [[Array]] - world position in format [[Position2D]] or [[Position3D]] | |p2= position : [[Array]] - world position in format [[Position#Introduction|Position2D]] or [[Position#Introduction|Position3D]] | ||
| [[Array]] - screen coordinates in format [x, y] | |r1= [[Array]] - screen coordinates in format [x, y] | ||
| | |x1= <sqf>_screenCoord = _control ctrlMapWorldToScreen _worldCoord;</sqf> | ||
| [[ctrlMapScreenToWorld]] | |x2= <sqf>_screenCoord = _control ctrlMapWorldToScreen position player;</sqf> | ||
|seealso= [[ctrlMapScreenToWorld]] [[posWorldToScreen]] | |||
}} | }} | ||
<dl class="command_description"> | <dl class="command_description"> | ||
< | <dt><dt> | ||
<dd class="notedate">Posted on 2010-06-16</dd> | |||
<dd class="notedate">Posted on | <dt class="note">[[User:kju|kju]]</dt> | ||
<dt class="note">[[User:kju|kju]] | |||
<dd class="note"> | <dd class="note"> | ||
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.<br> | 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.<br> | ||
In other words you can make the actual world position (of an object for example), relative to your active map display. | In other words you can make the actual world position (of an object for example), relative to your active map display. | ||
</dl> | </dl> | ||
Revision as of 23:08, 13 May 2023
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:
- Example 2:
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 2010-06-16
- 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