Difference between revisions of "MIST groupToPoint"

From DCS World Wiki - Hoggitworld.com
m
m
Line 5: Line 5:
 
|vNum = Mist 2.0
 
|vNum = Mist 2.0
  
|desc= This function will set the task of the specified group to go a the point defined by a zones location. group can be either a group name or a group table. point can be a zoneTable or zoneName. form is the default formation name in as defined by the scripting engine. See mist.ground.buildWP or the Scripting Engine wiki for details. Heading is the final heading the group will be oriented in once it reaches its destination. speed is the speed in kilometers per hour that the group will travel at to reach its destination. dontUseRoads defines if the group will use a road to get to the point.   
+
|desc= This function will set the task of the specified group to go a the point defined by a zones location. 'group' can be either a group name or a group table. The destination point can be either a zoneTable structure or a zoneName. 'form' is the default formation name as defined by the scripting engine. (See mist.ground.buildWP or the Scripting Engine wiki for details). 'Heading' is the final heading the group will be oriented in once it reaches its destination. 'speed' is the speed in kilometers per hour that the group will travel at to reach its destination. 'ignoreRoads' controls whether the group will try to use roads to get to the point.   
  
 
|rtnType= nothing
 
|rtnType= nothing
Line 33: Line 33:
 
|optType4= boolean
 
|optType4= boolean
  
|optName4= useRoads
+
|optName4= ignoreRoads
  
 
|varExamples= group = 'myGroup'  
 
|varExamples= group = 'myGroup'  
Line 56: Line 56:
 
speed = any positive number. (Group limited by lowest max speed of vehicles in the group)
 
speed = any positive number. (Group limited by lowest max speed of vehicles in the group)
  
dontUseRoads = boolean (any value)  True if you don't want to force the group not use a road. Otherwise if the destination is further than 1.3* the radius of the destination zone the group will automatically seek out a road to go to the destination.  
+
ignoreRoads = boolean (any value)  True if you don't want the group to use roads. Otherwise if the destination is further than 1.3* the radius of the destination zone the group will automatically seek out a road to go to the destination.  
  
 
|rtnExamples= nothing
 
|rtnExamples= nothing

Revision as of 02:07, 22 January 2023


mist.groupToPoint

Added with: Mist 2.0
Description
This function will set the task of the specified group to go a the point defined by a zones location. 'group' can be either a group name or a group table. The destination point can be either a zoneTable structure or a zoneName. 'form' is the default formation name as defined by the scripting engine. (See mist.ground.buildWP or the Scripting Engine wiki for details). 'Heading' is the final heading the group will be oriented in once it reaches its destination. 'speed' is the speed in kilometers per hour that the group will travel at to reach its destination. 'ignoreRoads' controls whether the group will try to use roads to get to the point.
Syntax
nothing mist.groupToPoint(table/string group/groupName ,table/string zoneTable/zoneName , string form ,number heading ,number speed ,boolean ignoreRoads )
Valid Input Values:
group = 'myGroup'

or group = Group.getByName('myGroup')

table = 'myZone' table = zoneTable

form =

 "Off Road" - moving off-road in Column formation 
 "On Road" - moving on road in Column formation 
 "Rank" - moving off road in Row formation 
 "Cone" - moving in Wedge formation 
 "Vee" - moving in Vee formation 
 "Diamond" - moving in Diamond formation 
 "EchelonL" - moving in Echelon Left formation 
 "EchelonR" - moving in Echelon Right formation  

heading = -360 to 360

speed = any positive number. (Group limited by lowest max speed of vehicles in the group)

ignoreRoads = boolean (any value) True if you don't want the group to use roads. Otherwise if the destination is further than 1.3* the radius of the destination zone the group will automatically seek out a road to go to the destination.

Return value:
nothing
Return example:
nothing
Usage Examples:
 mist.groupToPoint('myGroup', 'myZone', nil, 35, 30)
 mist.groupToPoint('myGroup2', 'myZone', 'cone', nil, nil, true)

Notes:
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