BIS fnc findOverwatch: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - " <h3 style="display:none">Notes</h3> <dl class="command_description"> <!-- Note Section BEGIN --> <!-- Note Section END --> </dl>" to "") |
Lou Montana (talk | contribs) m (Text replacement - " *\| *([Cc]omments|COMMENTS|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments \("local" or "global"\)|Multiplayer Effects \("local" or "global"\)|Multiplayer Execution \("server" o...) |
||
Line 1: | Line 1: | ||
{{Function | {{Function | ||
| arma3 | | arma3 | ||
|1.00 | |1.00 | ||
|gr1 = Positions | |gr1 = Positions | ||
| Selects a position that provides overwatch onto another position. | | Selects a position that provides overwatch onto another position. | ||
| [target, maxDistance, minDistance, minHeightAbove, searchCentre] call [[BIS_fnc_findOverwatch]] | | [target, maxDistance, minDistance, minHeightAbove, searchCentre] call [[BIS_fnc_findOverwatch]] | ||
|p1= target: [[Position3D]] - '''not''' an object | |p1= target: [[Position3D]] - '''not''' an object | ||
|p2= maxDistance: [[Number]] - (Optional, default 500) maximum distance from target in meters | |p2= maxDistance: [[Number]] - (Optional, default 500) maximum distance from target in meters | ||
|p3= minDistance: [[Number]] - (Optional, default 100) minimum distance from target in meters | |p3= minDistance: [[Number]] - (Optional, default 100) minimum distance from target in meters | ||
|p4= minHeightAbove: [[Number]] - (Optional, default 50) minimum height in relation to target in meters | |p4= minHeightAbove: [[Number]] - (Optional, default 50) minimum height in relation to target in meters | ||
|p5= searchCentre: [[Position3D]] - (Optional, default ''target'') position to start looking from, if different from target pos | |p5= searchCentre: [[Position3D]] - (Optional, default ''target'') position to start looking from, if different from target pos | ||
| [[Position]] - ''target'' position if no result were found | | [[Position]] - ''target'' position if no result were found | ||
|x1= <code><nowiki>[</nowiki>[[getPosATL]] enemyTank, 300, 75, 20, [[getPosATL]] [[player]]] [[call]] [[BIS_fnc_findOverwatch]];</code> | |x1= <code><nowiki>[</nowiki>[[getPosATL]] enemyTank, 300, 75, 20, [[getPosATL]] [[player]]] [[call]] [[BIS_fnc_findOverwatch]];</code> | ||
| [[BIS_fnc_findSafePos]] | | [[BIS_fnc_findSafePos]] | ||
}} | }} | ||
Revision as of 23:01, 17 January 2021
Description
- Description:
- Selects a position that provides overwatch onto another position.
- Execution:
- call
- Groups:
- Positions
Syntax
- Syntax:
- [target, maxDistance, minDistance, minHeightAbove, searchCentre] call BIS_fnc_findOverwatch
- Parameters:
- target: Position3D - not an object
- maxDistance: Number - (Optional, default 500) maximum distance from target in meters
- minDistance: Number - (Optional, default 100) minimum distance from target in meters
- minHeightAbove: Number - (Optional, default 50) minimum height in relation to target in meters
- searchCentre: Position3D - (Optional, default target) position to start looking from, if different from target pos
- Return Value:
- Position - target position if no result were found
Examples
- Example 1:
[getPosATL enemyTank, 300, 75, 20, getPosATL player] call BIS_fnc_findOverwatch;
Additional Information
- See also:
- BIS_fnc_findSafePos
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note
Bottom Section
- Posted on October 19, 2018 - 21:40 (UTC)
- Tankbuster
- Note that this function returns a 2D position, that is, an array containing an x and a y value, but no z (no altitude).
- Posted on April 15, 2020 - 13:53 (UTC)
- Tankbuster
- 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.