roadAt

From Bohemia Interactive Community
Jump to: navigation, search
Introduced with Arma 3 version 1.58
  Arguments of this scripting command don't have to be local to the client the command is executed on

Click on the images for descriptions

Introduced in

Game:
Arma 3
Version:
1.58

Description

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

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

Multiplayer:
-
See also:
nearRoadsroadsConnectedToisOnRoadsurfaceIsWater

Notes

Only post proven facts here. Report bugs on the feedback tracker. Use the talk page or the forums for discussions.
Add New Note | How To

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;