MIST getUnitsInZones

From DCS World Wiki - Hoggitworld.com
Revision as of 23:00, 13 April 2018 by Grimes (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


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, getRandomPointInPoly, isTerrainValid, terrainHeightDiff, getUnitsInZones, getUnitsInMovingZones, pointInPolygon, getUnitsInPolygon, getDeadMapObjsInZones, getDeadMapObjsInPolygonZone, getUnitsLOS, random, randomizeNumTable, getAvgPoint, getQFE, getWindBearingAndVel, getPathLength, getPathInSegments, getPointAtDistanceOnPath, projectPoint, getGroupsByAttribute, , getUnitsByAttribute, mapValue,

Scripting Engine

MIST Root Page