MIST getGroupPoints

From DCS World Wiki - Hoggitworld.com


mist.getGroupPoints

Added with: Mist 1.0
Description
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.
Syntax
table mist.getGroupPoints(string groupName )
Valid Input Values:
group = 'myGroup'
Return value:
table
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"

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

Notes:
Related Functions
getGroupData, getCurrentGroupData, getGroupTable getGroupPoints, getGroupRoute, getLeadPos, getAvgPos, getPayload, getGroupPayload, randomizeGroupOrder, groupIsDead

Scripting Engine

MIST Root Page