BIS fnc findOverwatch: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "_{10,} " to "")
m (Some wiki formatting)
 
(27 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Function|Comments=
{{RV|type=function


| arma3 |Game name=
|game1= arma3
|version1= 1.00


|1.00|Game version=
|gr1= Positions


|gr1 = Positions |GROUP1=
|descr= Selects a position that provides overwatch onto another position.


| Selects a position that provides overwatch onto another position. |DESCRIPTION=
|s1= [target, maxDistance, minDistance, minHeightAbove, searchCentre] call [[BIS_fnc_findOverwatch]]


| [target, maxDistance, minDistance, minHeightAbove, searchCentre] call [[BIS_fnc_findOverwatch]] |SYNTAX=
|p1= target: [[Position#Introduction|Position3D]] - '''not''' an object


|p1= target: [[Position3D]] - '''not''' an object |PARAMETER1=
|p2= maxDistance: [[Number]] - (Optional, default 500) maximum distance from target in meters


|p2= maxDistance: [[Number]] - (Optional, default 500) maximum distance from target in meters |PARAMETER2=
|p3= minDistance: [[Number]] - (Optional, default 100) minimum distance from target in meters


|p3= minDistance: [[Number]] - (Optional, default 100) minimum distance from target in meters |PARAMETER3=
|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 |PARAMETER4=
|p5= searchCentre: [[Position#Introduction|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 |PARAMETER5=
|r1= [[Position]] - ''target'' position if no result were found


| [[Position]] - ''target'' position if no result were found |RETURNVALUE=
|x1= <sqf>[getPosATL enemyTank, 300, 75, 20, getPosATL player] call BIS_fnc_findOverwatch;</sqf>


|x1= <code><nowiki>[</nowiki>[[getPosATL]] enemyTank, 300, 75, 20, [[getPosATL]] [[player]]] [[call]] [[BIS_fnc_findOverwatch]];</code> |EXAMPLE1=
|seealso= [[BIS_fnc_findSafePos]]
}}


| [[BIS_fnc_findSafePos]] |SEEALSO=
{{Note
|user= Tankbuster
|timestamp= 20181019214000
|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).
}}
}}


<h3 style="display:none">Notes</h3>
{{Note
<dl class="command_description">
|user= Tankbuster
<!-- Note Section BEGIN -->
|timestamp= 20200415135300
 
|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.
<!-- Note Section END -->
}}
</dl>
 
<h3 style="display:none">Bottom Section</h3>
 
[[Category:Functions|{{uc:findOverwatch}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:findOverwatch}}]]
 
<!-- CONTINUE Notes -->
<dl class="command_description">
<dd class="notedate">Posted on October 19, 2018 - 21:40 (UTC)</dd>
<dt class="note">[[User:Tankbuster|Tankbuster]]</dt>
<dd class="note">
Note that this function returns a 2D position, that is, an array containing an x and a y value, but no z (no altitude).
</dd>
</dl>
<!-- DISCONTINUE Notes -->
 
<!-- CONTINUE Notes -->
<dl class="command_description">
<dd class="notedate">Posted on April 15, 2020 - 13:53 (UTC)</dd>
<dt class="note">[[User:Tankbuster|Tankbuster]]</dt>
<dd class="note">
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.
</dd>
</dl>
<!-- DISCONTINUE Notes -->

Latest revision as of 13:32, 13 July 2022

Hover & click on the images for description

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
Tankbuster - c
Posted on Oct 19, 2018 - 21:40 (UTC)
Note that this function returns a 2D position, that is, an array containing an x and a y value, but no z (no altitude).
Tankbuster - c
Posted on Apr 15, 2020 - 13:53 (UTC)
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.