{"name":"BIS_fnc_nearestRoad","operator":null,"title":"BIS fnc nearestRoad","type":"function","url":"https://community.bistudio.com/wiki/BIS_fnc_nearestRoad","revid":378228,"updated":"2026-03-17T23:25:48Z","groups":["Positions"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"0.76"}],"since":{"game":"arma3","name":"Arma 3","version":"0.76"},"arma3_since":"0.76","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"Find the nearest road segment to certain position, within given radius.","syntaxes":[{"syntax":"[centre, radius, blacklist] call BIS_fnc_nearestRoad","since":null,"effect":null,"exec":null,"params":[{"name":"centre","type":"Position","optional":false,"default":null,"description":null,"types":["Position"],"since":null,"text":"centre: Position"},{"name":"radius","type":"Number","optional":true,"default":"50","description":"search radius from *centre*","types":["Number"],"since":null,"text":"radius: Number - (Optional, default 50) search radius from *centre*"},{"name":"blacklist","type":"Array","optional":true,"default":"`[]`","description":"blacklisted road objects","types":["Array"],"since":null,"text":"blacklist: Array - (Optional, default `[]`) blacklisted road objects"}],"returns":{"type":"Object","types":["Object"],"description":"nearest road object, objNull if not found","text":"Object - nearest road object, objNull if not found"}}],"examples":[{"text":"```sqf\nprivate _nearestRoad = [getPosATL player, 500] call BIS_fnc_nearestRoad;\n```","code":["private _nearestRoad = [getPosATL player, 500] call BIS_fnc_nearestRoad;"]},{"text":"```sqf\nprivate _nearestRoad = [getPosATL vehicle player, 50, getPosATL vehicle player nearRoads 20] call BIS_fnc_nearestRoad;\n```","code":["private _nearestRoad = [getPosATL vehicle player, 50, getPosATL vehicle player nearRoads 20] call BIS_fnc_nearestRoad;"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["nearRoads","isOnRoad","roadAt","roadsConnectedTo"],"notes":[],"categories":["Arma 3: Functions","Arma 3: New Functions","Function Group: Positions","Functions","Introduced with Arma 3 version 0.76"],"docblock":null,"filled_from_docblock":[]}