MIST getUnitsInZones

From DCS World Wiki - Hoggitworld.com


mist.getUnitsInZones

Added with: Mist 1.0
Description
Returns a table of units from the table unit_names that are inside any of the zones listed in the table of zone_names.
Syntax
table mist.getUnitsInZones(UnitNameTable unit_names ,table zone_names , string zone_type )
Valid Input Values:
ExampleUnitNameTable
zone_names = {'zone1', 'zone2'}

zone_type =

'cylinder' - cylindrical shaped zone extending to +/- infinity in altitude. 
'sphere' - spherical zone
Return value:
table
Return example:
unitNameTable
Usage Examples:

-- With a zone on the map named "KutaisiBattle"

-- Get total number of units in the zone

u = mist.getUnitsInZones(mist.makeUnitTable({'[all]'}), {'KutaisiBattle'})

env.info(#u)

Notes:
Is called by and is related to Units in zones
Related Functions
makeUnitTable, getRandPointInCircle, getRandomPointInZone, isTerrainValid, terrainHeightDiff, getUnitsInZones, getUnitsInMovingZones, pointInPolygon, getUnitsInPolygon, getDeadMapObjsInZones, getDeadMapObjsInPolygonZone, getUnitsLOS, random, randomizeNumTable, stringMatch, getAvgPoint, getQFE

Scripting Engine

MIST Root Page