MIST getGroupPoints

From DCS World Wiki - Hoggitworld.com


Added with: Mist 1.0
Returns a table of Vec2 points that define the default route of the group named groupName as set within the mission editor. This function is great when used in combination with mist.pointInPolygon; you can “draw” your polygon with the waypoints of a unit (that never gets activated), and then feed the mist.pointInPolygon with the returned values of mist.getGroupPoints.
table mist.getGroupPoints(string groupName )
Valid Input Values:
group = 'myGroup'
Return value:
Return example:
{ [1] = {x = 299435.224, y = -1146632.6773}, [2] = { x = 663324.6563, y = 322424.1112}}
Usage Examples:
assuming that “point” is a vec2 or vec3 map coordinate, inZone will now be a boolean that reflects whether or not that point is inside the polygon created by the waypoints of the group named “Polygon Group 1"

   inZone = mist.pointInPolygon(point, mist.getGroupPoints('Polygon Group 1')) 

Related Functions
getGroupData, getCurrentGroupData, getGroupPoints, getGroupRoute, getLeadPos, getAvgPos, getPayload, getGroupPayload, randomizeGroupOrder

Scripting Engine

MIST Root Page