roadAt: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "v1\.[9-9]{2}\.[0-9]{6}" to "v2.00")
m (Text replacement - "<dl class="command_description"> <dd class="notedate">" to "<dl class="command_description"> <dt></dt> <dd class="notedate">")
Line 26: Line 26:
<!-- CONTINUE Notes -->
<!-- CONTINUE Notes -->
<dl class="command_description">
<dl class="command_description">
<dt></dt>
<dd class="notedate">Posted on December 30, 2016 - 21:40 (UTC)</dd>
<dd class="notedate">Posted on December 30, 2016 - 21:40 (UTC)</dd>
<dt class="note">[[User:OOKexOo|OOKexOo]]</dt>
<dt class="note">[[User:OOKexOo|OOKexOo]]</dt>

Revision as of 13:38, 5 April 2021

Hover & click on the images for description

Description

Description:
Description needed
Groups:
Roads and Airports

Syntax

Syntax:
Syntax needed
Parameters:
position: Object or Array in format PositionAGL (especially on bridges) or (since Arma 3 v2.00) Position2D, in which case Z will be automatically deduced as the height of the road surface
Return Value:
Return value needed

Examples

Example 1:
_road = roadAt ASLToAGL getPosASL player;
Example 2:
_isOnRoad = !isNull roadAt player;
Example 3:
For detecting bridges, for examplegetModelInfo (roadAt ASLToAGL getPosASL player); // ["bridgesea_01_f.p3d","a3\structures_f_exp\infrastructure\bridges\bridgesea_01_f.p3d",true]

Additional Information

See also:
nearRoadsroadsConnectedToisOnRoadsurfaceIsWatergetRoadInfonearestTerrainObjects

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 December 30, 2016 - 21:40 (UTC)
OOKexOo
This command does not nessecarly return the segment which center is the closest to the given position.
In order to get such segment use nearRoads.
_closest_road = (_pos nearRoads 0.1) select 0;