MIST groundPatrolRoute

From DCS World Wiki - Hoggitworld.com


mist.ground.patrolRoute

Added with: Mist 3.2
Description
This function will re-assign a route for groupName once the group reaches the end if its route.
Syntax
nothing mist.ground.patrolRoute(table vars )
Valid Input Values:

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

 vars = 
 {
 groupName/groupTable = string/table groupName/groupTable,
 useGroupRoute/route = string/table useGroupRoute/route, 
 speed = number speed, 
 offRoadForm = string offRoadForm, 
 onRoadForm = string onRoadForm, 
 patrolType = string patrolType,
 }

groupName/groupTable is a Group class table of the group (Group.getByName('myGroup')) or a string of the groups name.

useGroupRoute/route Is an optional variable to define which route is to be used.

 If neither value is given the route used will be the default route defined by the mission editor for the group set to patrol
 
 useGroupRoute is the name of the group from which the patrol route will be used. 
 
 route is a table of route data that overrides the useGroupRoute variable to define the route used. 

speed is the speed in meters per second that the group will travel at. If not provided the speed of each waypoint as defined in the editor is used. If speed is invalid the default value of 6 meters per second is used.

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

onRoadForm specifies the formation used for waypoints specified as "on road".

patrolType specifies the type of patrol used.

doubleBack  - Group follows the route in the order of 1, 2, 3, 2, 1, 2, 3, 2, ...
nil or anything - Group follows route, when route is finish group travels back to WP 1: 1, 2, 3, 1, 2, 3, 1, ...
Return value:
nothing
Return example:
nothing
Usage Examples:

do

local vars = {}
vars.gpData = 'myGroup',
vars.useGroupRoute = 'dummyPatrolRoute'
vars.offRoadForm = 'diamond'
vars.pType = 'doubleBack'
mist.ground.patrolRoute(vars)

end


do

 mist.group.patrolRoute({gpData = 'myGroup', pType = 'doubleBack', offRoadForm = 'diamond'})

end

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