Arma 3 Scripting

roadsConnectedTo

  • Arma 3 v0.50
  • First in Arma 2 v1.00

Command · Markdown · JSON · original wiki page

Description

Find the road segments connected to the given road segment.

Important

  • Pedestrian roads such as "TRAIL"s are missing connection information by design, therefore the primary syntax will return empty array for those - use the alternative syntax to return pedestrian roads.
  • Road connection is not bidirectional; e.g road segment Y can be connected to road segment Z, but road segment Z can lack a connection with road segment Y.

Syntax

Syntax 1

roadsConnectedTo roadSegment

Parameters:

Returns: Array of Objects - connected road segments

Syntax 2

since arma3 2.00

roadsConnectedTo [roadSegment, extended]

Parameters:

Returns: Array of Objects - connected road segments

Examples

Example 1

_road = (player nearRoads 50) select 0;
_connectedRoads = roadsConnectedTo _road;

Example 2

_road = (player nearRoads 50) select 0;
_connectedRoadsIncPedestrian = roadsConnectedTo [_road, true];

See also

nearRoads · isOnRoad · roadAt · surfaceIsWater · getRoadInfo · nearestTerrainObjects