BIS fnc findOverwatch: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (1 revision)
(Page filling)
Line 1: Line 1:
{{Function|= Comments
{{Function|= Comments
____________________________________________________________________________________________
____________________________________________________________________________________________
Line 8: Line 7:
____________________________________________________________________________________________
____________________________________________________________________________________________


| <pre>/*
| Selects a position that provides overwatch onto another position. |= Description
File: fn_findOverwatch.sqf
____________________________________________________________________________________________
 
| [target, maxDistance, minDistance, minHeightAbove, searchCentre] call [[BIS_fnc_findOverwatch]] |= Syntax
 
|p1= target: [[Position]] - '''not''' an object |= Parameter 1


Description:
|p2= maxDistance: [[Number]] - (Optional, default 500) maximum distance from target in meters |= Parameter 2
Function which selects a position that provides overwatch
onto another position.


Parameter(s):
|p3= minDistance: [[Position]] - (Optional, default 100) minimum distance from target in meters |= Parameter 3
_this select 0: the target position (position)
_this select 1: maximum distance from target in meters (optional)
_this select 2: minimum distance from target in meters (optional)
_this select 3: minimum height in relation to target in meters (optional)
_this select 4: position to start looking from, if different from target pos (optional)
*/
</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |= Description
____________________________________________________________________________________________


| <!-- [] call [[BIS_fnc_findOverwatch]]; --> |= Syntax
|p4= minHeightAbove: [[Position]] - (Optional, default 50) minimum height in relation to target in meters |= Parameter 4


|p1= |= Parameter 1
|p5= searchCentre: [[Position]] - (Optional, default ''target'') position to start looking from, if different from target pos |= Parameter 5


| |= Return value
| [[Position]] - ''target'' position if no result were found |= Return value
____________________________________________________________________________________________
____________________________________________________________________________________________


|x1= <code></code> |=  
|x1= <code><nowiki>[</nowiki>[[getPosATL]] enemyTank, 300, 75, 20, [[getPosATL]] [[player]]] [[call]] [[BIS_fnc_findOverwatch]];</code> |= Example 1
____________________________________________________________________________________________
____________________________________________________________________________________________


| |= See also
| [[BIS_fnc_findSafePos]] |= See also
 
}}
}}



Revision as of 01:50, 7 May 2018

Hover & click on the images for description

Description

Description:
Selects a position that provides overwatch onto another position.
Execution:
call
Groups:
Uncategorised

Syntax

Syntax:
[target, maxDistance, minDistance, minHeightAbove, searchCentre] call BIS_fnc_findOverwatch
Parameters:
target: Position - not an object
maxDistance: Number - (Optional, default 500) maximum distance from target in meters
minDistance: Position - (Optional, default 100) minimum distance from target in meters
minHeightAbove: Position - (Optional, default 50) minimum height in relation to target in meters
searchCentre: Position - (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

Notes

Bottom Section