customWaypointPosition: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " \{\{GameCategory *\| *arma3 *\| *(New )?Scripting Commands\}\}" to "")
m (Some wiki formatting)
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{RV|type=command
{{RV|type=command


| arma3
|game1= arma3
 
|version1= 1.92
|1.92


|gr1= Waypoints
|gr1= Waypoints


| Returns player's custom waypoint (LShift + LMB) [[Position]] or an empty array <tt>[]</tt> if no custom waypoint exists.
|descr= Returns player's custom waypoint ({{Controls|LShift|LMB}}) position.


| [[customWaypointPosition]]
|s1= [[customWaypointPosition]]


|r1=[[Position]] in format [x,y,0] or []
|r1= [[Array]] in format [[Position]] as [x,y,0], or empty array [] if the waypoint does not exist


|x1= <code>[[customWaypointPosition]]</code>
|x1= <sqf>
if (customWaypointPosition isNotEqualTo []) then
{
hint format ["You are %1m away from your custom waypoint.", round (player distance customWaypointPosition)];
};
</sqf>


|seealso= [[allMapMarkers]]
|seealso= [[allMapMarkers]]
}}
}}

Latest revision as of 11:13, 7 March 2023

Hover & click on the images for description

Description

Description:
Returns player's custom waypoint (⇧ Shift + Left Mouse Button) position.
Groups:
Waypoints

Syntax

Syntax:
customWaypointPosition
Return Value:
Array in format Position as [x,y,0], or empty array [] if the waypoint does not exist

Examples

Example 1:
if (customWaypointPosition isNotEqualTo []) then { hint format ["You are %1m away from your custom waypoint.", round (player distance customWaypointPosition)]; };

Additional Information

See also:
allMapMarkers

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