MIST getRandomPointInZone

From DCS World Wiki - Hoggitworld.com


Added with: Mist 3.6
Returns a randomly generated vec2 coordinate within the specified zone as defined within the mission editor. If the optional variable innerRadius is given the random point will be generated that has a minimum distance of innerRadius and a maximum distance of radius from the point.
vec2 mist.getRandomPointInZone(string zoneName , number innerRadius )
Valid Input Values:
The following values have to have the correct type of data
zoneName= any zone name created in the mission editor
innerRadius = any positive number less than radius
Return value:
Return example:
Usage Examples:
The following code will deploy a smoke marker randomly inside a zone with a minimum distance of 200 meters from the center of the zone


local newPoint = mist.getRandomPointInZone('myZone', 200)
trigger.action.smoke(newPoint, trigger.smokeColor.Red


Uses: GetRandomPointInCircle
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