MIST getUnitsLOS

From DCS World Wiki - Hoggitworld.com


mist.getUnitsLOS

Added with: Mist 1.0
Description
Returns a table with line of sight (LOS) data about which units in unitset2 are LOS to the units in unitset1. The “sighting” point of each unit in each unitset is determined by the corresponding altoffset value. A maximum radius at which LOS is ignored can be optionally specified with radius.
Syntax
table mist.getUnitsLOS(table unitNameTable1 ,number altOffSet1 ,table unitNameTable2 ,number altOffSet2 , number radius )
Valid Input Values:
unitNameTable1= unitNameTable

altOffSet1 = any number

unitNameTable2= unitNameTable

altOffSet2 = any number

radius= number

Return value:
table
Return example:
LOSData = { 
    [1] = { 
        unit = <a unitset1 "Unit"-type object>, 
        vis = { 
            [1] = <a unitset2 "Unit"-type object>, 
            [2] = <a unitset2 "Unit"-type object>, 
            ... 
        } 
    }, 
    [2] = { 
        unit = <a unitset1 "Unit"-type object>, 
        vis = { 
            [1] = <a unitset2 "Unit"-type object>, 
            [2] = <a unitset2 "Unit"-type object>, 
             ... 
        }, 
    }, 
    ... 
} 

Usage Examples:

do

--code needed 

end

Notes:
Is called by and is related to Units_LOS
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