MIST groupToRandomPoint

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


Added with: Mist 2.0
Creates a path for the specified groupTable from the groups current location to the Vec3 destination point.
nothing mist.groupToRandomPoint(table vars )
Valid Input Values:

vars tables have the following recognized fields( required entries in blue, optional in green):

 vars = 
 group = table group, 
 point = table point,
 radius = number radius, 
 form = string form, 
 heading/headingDegrees = number/number heading/headingDegrees, 
 speed = number speed, 
 disableRoads = boolean disableRoads,

group is a Group class table of the group. (Group.getByName('myGroup')

point is a vec3 coordinate of the point the group is to travel to

radius is an optional variable that specifies a random distance from the point. If no radius is given the radius will default to 0

form specifies the formation used while off road enroute to the waypoint. Offroad formations default to the formation "cone" as defined in mist.ground.buildWP.

heading/headingDegrees heading and headingDegrees are optional variables to define the direction the group will face once they reach the point. heading is measured in radians. headingDegrees is measured in degrees. If neither value is given the final heading is randomized.

speed is the speed in meters per second the group is to travel at. If no speed is given the speed used at each waypoint will vary between 20 and 60 kilometers per hour.

disableRoads will allow or deny the group use of roads to get to the destination. Roads are enabled by default, however AI will only use roads if they are outside of 1.3 x the radius from the destination point.

Return value:
Return example:
Usage Examples:



Related Functions
General goRoute
Ground groupToPoint, groupToRandomZone, groupRandomDistSelf, groupToRandomPoint, buildWP(ground), patrol, patrolRoute
Fixed Wing buildWP(fixedWing)
Helicopter buildWP(helicopter)

Scripting Engine

MIST Root Page