roadAt: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "|= Comments" to "|Comments=")
m (Text replacement - "| A3 |= Game " to "| arma3 |Game name= ")
Line 2: Line 2:
____________________________________________________________________________________________
____________________________________________________________________________________________


| A3 |= Game
| arma3 |Game name=
|1.58|Game Version= (number surrounded by NO SPACES)
|1.58|Game Version= (number surrounded by NO SPACES)
|arg= global|Multiplayer Arguments=
|arg= global|Multiplayer Arguments=

Revision as of 15:59, 3 September 2019

Hover & click on the images for description

Description

Description:
Returns road segment at given position, objNull otherwise. Same as isOnRoad only returns the actual road object instead of boolean.
Groups:
Uncategorised

Syntax

Syntax:
roadAt position
Parameters:
position: Object or Array in format PositionAGL (especially on bridges)
Return Value:
Object - road segment or objNull

Examples

Example 1:
_road = roadAt ASLToAGL getPosASL player;
Example 2:
_isOnRoad = !isNull roadAt player;

Additional Information

See also:
nearRoadsroadsConnectedToisOnRoadsurfaceIsWater

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

Notes

Bottom Section

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;