{"name":"getRoadInfo","title":"getRoadInfo","type":"command","url":"https://community.bistudio.com/wiki/getRoadInfo","revid":377688,"updated":"2026-01-02T09:03:05Z","groups":["Roads and Airports"],"status":"ok","games":{"arma3":"2.00"},"since":"arma3 2.00","arma3_since":"2.00","description":"Returns road piece information.\n\n> [!NOTE]\n> - 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.\n> - 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.","syntaxes":[{"syntax":"getRoadInfo road","params":[{"name":"road","type":"Object","type_expr":"Object"}],"returns":{"type":"Array","type_expr":"Array","description":"with [mapType, width, isPedestrian, texture, textureEnd, material, begPos, endPos, isBridge, AIpathOffset]\n- mapType: String - road segment type, could be `\"HIDE\"`, `\"ROAD\"`, `\"MAIN ROAD\"`, `\"TRACK\"`, `\"TRAIL\"` (see nearestTerrainObjects) - width: Number - road segment width - isPedestrian: Boolean - when true road is for pedestrian use only - texture: String - road segment surface texture - textureEnd: String - road segment surface texture - material: String - road segment surface material - begPos: PositionASL - start of the road segment - endPos: PositionASL - finish of the road segment - isBridge: Boolean - when true road segment is a bridge - Arma 3 v2.12 AIpathOffset: Number - config value of `AIpathOffset`","text":"Array with [mapType, width, isPedestrian, texture, textureEnd, material, begPos, endPos, isBridge, AIpathOffset]\n\n- mapType: String - road segment type, could be `\"HIDE\"`, `\"ROAD\"`, `\"MAIN ROAD\"`, `\"TRACK\"`, `\"TRAIL\"` (see nearestTerrainObjects)\n- width: Number - road segment width\n- isPedestrian: Boolean - when true road is for pedestrian use only\n- texture: String - road segment surface texture\n- textureEnd: String - road segment surface texture\n- material: String - road segment surface material\n- begPos: PositionASL - start of the road segment\n- endPos: PositionASL - finish of the road segment\n- isBridge: Boolean - when true road segment is a bridge\n- Arma 3 v2.12 AIpathOffset: Number - config value of `AIpathOffset`"},"form":"unary","right":{"text":"road"}}],"examples":[{"code":["private _info = getRoadInfo _road;\n_info params [\"_mapType\", \"_width\", \"_isPedestrian\", \"_texture\", \"_textureEnd\", \"_material\", \"_begPos\", \"_endPos\", \"_isBridge\"];\nprivate _roadDirection = _begPos getDir _endPos;"]}],"see_also":["nearRoads","roadsConnectedTo","isOnRoad","roadAt","nearestTerrainObjects"]}