{"name":"BIS_fnc_findOverwatch","title":"BIS fnc findOverwatch","type":"function","url":"https://community.bistudio.com/wiki/BIS_fnc_findOverwatch","revid":327931,"updated":"2022-07-13T12:32:03Z","groups":["Positions"],"status":"ok","games":{"arma3":"1.00"},"since":"arma3 1.00","arma3_since":"1.00","description":"Selects a position that provides overwatch onto another position.","syntaxes":[{"syntax":"[target, maxDistance, minDistance, minHeightAbove, searchCentre] call BIS_fnc_findOverwatch","params":[{"name":"target","type":"Position3D","description":"**not** an object","type_expr":"Position3D"},{"name":"maxDistance","type":"Number","optional":true,"default":"500","description":"maximum distance from target in meters","type_expr":"Number","text":"maxDistance: Number - (Optional, default 500) maximum distance from target in meters"},{"name":"minDistance","type":"Number","optional":true,"default":"100","description":"minimum distance from target in meters","type_expr":"Number","text":"minDistance: Number - (Optional, default 100) minimum distance from target in meters"},{"name":"minHeightAbove","type":"Number","optional":true,"default":"50","description":"minimum height in relation to target in meters","type_expr":"Number","text":"minHeightAbove: Number - (Optional, default 50) minimum height in relation to target in meters"},{"name":"searchCentre","type":"Position3D","optional":true,"default":"target","description":"position to start looking from, if different from target pos","type_expr":"Position3D","text":"searchCentre: Position3D - (Optional, default *target*) position to start looking from, if different from target pos"}],"returns":{"type":"Position","type_expr":"Position","description":"target position if no result were found","text":"Position - *target* position if no result were found"}}],"examples":[{"code":["[getPosATL enemyTank, 300, 75, 20, getPosATL player] call BIS_fnc_findOverwatch;"]}],"see_also":["BIS_fnc_findSafePos"],"notes":[{"user":"Tankbuster","date":"2018-10-19T21:40:00Z","text":"Note that this function returns a 2D position, that is, an array containing an x and a y value, but no z (no altitude)."},{"user":"Tankbuster","date":"2020-04-15T13:53:00Z","text":"Further note that when this function fails to find an overwatch position and returns the *target*, the x and y components will be exactly the same, but the z might not be."}]}