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:
roadSegment: Object - road segment
Returns: Array of Objects - connected road segments
Syntax 2
since arma3 2.00
roadsConnectedTo [roadSegment, extended]
Parameters:
roadSegment: Object - road segmentextended: Boolean - (Optional, default false) when true, performs a more thorough search on top of base behaviour, slower but returns pedestrian and other missing road segments
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