{"name":"nearRoads","title":"nearRoads","type":"command","url":"https://community.bistudio.com/wiki/nearRoads","revid":379453,"updated":"2026-10-31T00:08:32Z","groups":["Roads and Airports","Object Detection"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Find the road segments within the circle of given radius.","syntaxes":[{"syntax":"pos nearRoads radius","params":[{"name":"pos","type":"Object or PositionAGL or Position2D","description":"center of search radius","type_expr":"Object | PositionAGL | Position2D"},{"name":"radius","type":"Number","description":"search radius in meters","type_expr":"Number"}],"returns":{"type":"Array of Objects","type_expr":"Array<Object>","description":"road segments within radius"},"form":"binary","left":{"text":"pos"},"right":{"text":"radius"}}],"examples":[{"code":["_list = player nearRoads 50;"]},{"code":["_list = (position _unit) nearRoads 50;"]},{"code":["_list = [1800,5700] nearRoads 50;"]}],"see_also":["isOnRoad","roadAt","surfaceIsWater","roadsConnectedTo","findNearestEnemy","nearestBuilding","nearestObject","nearestObjects","nearObjects","nearestLocation","nearEntities","nearTargets","nearSupplies","nearestLocationWithDubbing","nearObjectsReady","getRoadInfo","nearestTerrainObjects","nearestMines"],"notes":[{"user":"Tankbuster","date":"2011-03-26T00:00:00Z","text":"NearRoads always gets data in the same order. In a 300 meter radius around Feruz Abad, for example, the first one is in the south-west corner and the last one is in the north-east."}]}