{"name":"getRoadInfo","operator":null,"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","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"2.00"}],"since":{"game":"arma3","name":"Arma 3","version":"2.00"},"arma3_since":"2.00","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"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","since":null,"effect":null,"exec":null,"params":[{"name":"road","type":"Object","optional":false,"default":null,"description":null,"types":["Object"],"since":null,"text":"road: Object"}],"returns":{"type":"Array with [mapType, width, isPedestrian, texture, textureEnd, material, begPos, endPos, isBridge, AIpathOffset]","types":["Array"],"description":"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- 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","operator":null,"left":null,"right":{"text":"road","types":["Object"]}}],"examples":[{"text":"```sqf\nprivate _info = getRoadInfo _road;\n_info params [\"_mapType\", \"_width\", \"_isPedestrian\", \"_texture\", \"_textureEnd\", \"_material\", \"_begPos\", \"_endPos\", \"_isBridge\"];\nprivate _roadDirection = _begPos getDir _endPos;\n```","code":["private _info = getRoadInfo _road;\n_info params [\"_mapType\", \"_width\", \"_isPedestrian\", \"_texture\", \"_textureEnd\", \"_material\", \"_begPos\", \"_endPos\", \"_isBridge\"];\nprivate _roadDirection = _begPos getDir _endPos;"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["nearRoads","roadsConnectedTo","isOnRoad","roadAt","nearestTerrainObjects"],"notes":[],"categories":["Arma 3: New Scripting Commands","Arma 3: Scripting Commands","Command Group: Roads and Airports","Introduced with Arma 3 version 2.00","Scripting Commands"]}