unitsBelowHeight: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "<h3 style='display:none'>Notes</h3> <dl class='command_description'> <!-- Note Section BEGIN --> <!-- Note Section END --> </dl> <h3 style='display:none'>Bottom Section</h3>" to "")
m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame( +[0-9])?|Game [Vv]ersion( +[0-9])?|Game Version \(number surrounded by NO SPACES\)|Arguments in MP|MP[Aa]rg|Multiplayer Arguments( \("local" or "global"\))?|Effects|Execution|Effects...)
Line 1: Line 1:
{{Command|Comments=
{{Command


| arma2 |Game name=
| arma2


|1.04|Game version=
|1.04


|arg= global|Multiplayer Arguments=
|arg= global


|gr1= Object Detection |GROUP1=
|gr1= Object Detection


|gr2= Positions |GROUP2=
|gr2= Positions


| Returns units in group/array below given Above Terrain Level (ATL) height.
| Returns units in group/array below given Above Terrain Level (ATL) height.
{{Informative | unit's ATL height can be found with {{Inline code|_height {{=}} ([[getPosATL]] _unit) [[select]] 2;}}}} |DESCRIPTION=
{{Informative | unit's ATL height can be found with {{Inline code|_height {{=}} ([[getPosATL]] _unit) [[select]] 2;}}}}


| units [[unitsBelowHeight]] height |SYNTAX=
| units [[unitsBelowHeight]] height


|p1= units: [[Array]] of [[Object]]s |PARAMETER1=
|p1= units: [[Array]] of [[Object]]s


|p2= height: [[Number]] - height above terrain level ([[PositionATL]]) |PARAMETER2=
|p2= height: [[Number]] - height above terrain level ([[PositionATL]])


| [[Array]] of [[Object]]s |RETURNVALUE=
| [[Array]] of [[Object]]s


|s2= group [[unitsBelowHeight]] height |SYNTAX2=
|s2= group [[unitsBelowHeight]] height


|p21= group: [[Group]] - AI group |PARAMETER21=  
|p21= group: [[Group]] - AI group |PARAMETER21=  
Line 28: Line 28:
|p22= height: [[Number]] - height above terrain level ([[PositionATL]]) |PARAMETER22=  
|p22= height: [[Number]] - height above terrain level ([[PositionATL]]) |PARAMETER22=  


|r2= [[Array]] of [[Object]]s |RETURNVALUE2=
|r2= [[Array]] of [[Object]]s


|x1= <code>_allOnGroudUnits = [[group]] [[player]] [[unitsBelowHeight]] 10;</code> |EXAMPLE1=
|x1= <code>_allOnGroudUnits = [[group]] [[player]] [[unitsBelowHeight]] 10;</code>


|x2= <code>_units = [[allUnits]] [[unitsBelowHeight]] 30;</code> |EXAMPLE2=
|x2= <code>_units = [[allUnits]] [[unitsBelowHeight]] 30;</code>


| [[allUnits]], [[getPosATL]], [[group]] |SEEALSO=
| [[allUnits]], [[getPosATL]], [[group]]
}}
}}



Revision as of 11:43, 18 January 2021

Hover & click on the images for description

Description

Description:
Returns units in group/array below given Above Terrain Level (ATL) height.
unit's ATL height can be found with _height = (getPosATL _unit) select 2;
Groups:
Object DetectionPositions

Syntax

Syntax:
units unitsBelowHeight height
Parameters:
units: Array of Objects
height: Number - height above terrain level (PositionATL)
Return Value:
Array of Objects

Alternative Syntax

Syntax:
group unitsBelowHeight height
Parameters:
group: Group - AI group
height: Number - height above terrain level (PositionATL)
Return Value:
Array of Objects

Examples

Example 1:
_allOnGroudUnits = group player unitsBelowHeight 10;
Example 2:
_units = allUnits unitsBelowHeight 30;

Additional Information

See also:
allUnitsgetPosATLgroup

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