Arma 3 Scripting

getRoadInfo

  • Arma 3 v2.00

Command · Markdown · JSON · original wiki page

Description

Returns road piece information.

Note

  • Bridges are special case. Only large bridges are part of Road Net. Small pedestrian bridges are not recognized as roads. Bridge "mapType" is "ROAD" so the best way to detect bridges is to check "isBridge" value. Bridges are not part of new roads and don't have the same info as other new roads, so only "mapType", "texture" (maybe "textureEnd"), "begPos", "endPos" and "isBridge" are updated.
  • Pedestrian roads "mapType" is usually "TRAIL". They are part of Road Net but excluded from path finding. Use roadsConnectedTo with alternative flag to find the connections between pedestrian roads.

Syntax

getRoadInfo road

Parameters:

Returns: Array with [mapType, width, isPedestrian, texture, textureEnd, material, begPos, endPos, isBridge, AIpathOffset]

Examples

Example 1

private _info = getRoadInfo _road;
_info params ["_mapType", "_width", "_isPedestrian", "_texture", "_textureEnd", "_material", "_begPos", "_endPos", "_isBridge"];
private _roadDirection = _begPos getDir _endPos;

See also

nearRoads · roadsConnectedTo · isOnRoad · roadAt · nearestTerrainObjects