Difference between revisions of "VN ms fnc tracker positionVisible"

From Savage Game Design Wiki
Jump to navigation Jump to search
m (Text replacement - "]]; |p1n=" to "]] |p1n=")
(Page filling)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
[[Category:TODO]]
 
 
{{Function
 
{{Function
  
Line 6: Line 5:
 
|author= Wyqer, veteran29
 
|author= Wyqer, veteran29
  
|a=
+
|a= global
  
 
|e=
 
|e=
Line 12: Line 11:
 
|g1= tracker
 
|g1= tracker
  
|d= <pre>/*
+
|d= Checks if position is visible for any of unit in group.
    Author: Wyqer, veteran29
 
    Date: 2019-07-31
 
  
    Description:
+
|s= [units, pos] call [[VN_ms_fnc_tracker_positionVisible]]
        Checks if position is visible for any of unit in group.
 
  
    Parameter(s):
+
|p1n= units
        _targets    - Units to check visibility for [ARRAY, defaults to []]
+
|p1t= array
        _position  - Positon ASL to check              [ARRAY, defaults to [0,0,0]]
+
|p1d= units to check
 
 
    Returns:
 
        Function reached the end [BOOL]
 
*/
 
params [
 
    ["_targets", [], [[]]],
 
    ["_position", [0,0,0], [[]], [2,3]]
 
];
 
 
 
// to handle positions 2D from "selectBestPlaces"
 
if (count _position == 2) then {
 
    // 1m above ground converted to ASL
 
    _position pushBack 1;
 
    _position = AGLToASL _position;
 
};
 
 
 
// check if there is any unit that can see the position
 
_targets findIf {
 
    [objNull, "VIEW"] checkVisibility [eyePos _x, _position] != 0;
 
} != -1
 
</pre><small>''(Placeholder description extracted from the function header by '''LM_exportFunctionsToWiki.sqf''')''</small>
 
 
 
|s= [] call [[vn_ms_fnc_tracker_positionVisible]]
 
 
 
|p1n=
 
|p1t=
 
|p1d=
 
 
|p1v=
 
|p1v=
  
|p2n=
+
|p2n= pos
|p2t=
+
|p2t= positionASL
|p2d=
+
|p2d= position to check
 
|p2v=
 
|p2v=
  
|r1t=
+
|r1t= boolean
|r1d=
+
|r1d= the position is visible by one of the units
  
|x1= <code>-</code>
+
|x1= <code>[units sogGroup, getPosASL crashSite] call [[VN_ms_fnc_tracker_positionVisible]];</code>
 
}}
 
}}

Latest revision as of 16:05, 26 February 2021

← back to Functions Introduced in S.O.G. Prairie Fire v1.00
by Wyqer, veteran29
Argument(s): global
Effect(s): unknown

Description

Checks if position is visible for any of unit in group.

Syntax

Syntax
[units, pos] call VN_ms_fnc_tracker_positionVisible
Parameters
units: Array - units to check
pos: PositionASL - position to check
Return value
Boolean - the position is visible by one of the units

Examples

Example 1
[units sogGroup, getPosASL crashSite] call VN_ms_fnc_tracker_positionVisible;