DCS task escort

From DCS World Wiki - Hoggitworld.com

Task: Escort Added with: 1.2.4
Hierarchy: Scripting Root > Tasks > Main task > Escort
Tasking Type: Main task
For: Airplanes, Helicopters
Available Under: Escort, SEAD
Description: Controlled aircraft will follow the assigned group along their route in formation and will engage threats within a defined distance from the followed group. If the assigned group is on the ground the AI will orbit overhead. If assigned to a flight lead or group its wingmen will stay in their specified formation.
Format: This task needs to be in the following format.
 Escort = {
  id = 'Escort',
  params = {
    groupId = Group.ID,
    pos = Vec3,
    lastWptIndexFlag = boolean,
    lastWptIndex = number
    engagementDistMax = Distance,
    targetTypes = array of AttributeName

Required parameters:

groupId: unique groupId.

pos: Vec3 point defining the relative position the controlled flight will form up on. For racetrack orbits, it is best to be back and to the right.

engagementDistMax: Maximum distance of targets from the followed aircraft that the AI will actively engage. If the AI is currently engaging a threat and the followed aircraft gets more than 1.5* the max engagement distance, then the escort aircraft will disengage and re-form on the aircraft they are escorting.

targetTypes: Is an array of object attributes which the AI will engage

--Need to add more details on the xyz coords so people better understand the positioning.

Optional Parameters:

lastWptIndexFlag : if true the AI will follow the group until it reaches a specified waypoint.

lastWptIndex : Identifies the waypoint at which the following group will stop its task.

Enumerators: N/A
Notes: See article Mission Editor: AI Tasking for more information on how AI tasking is handled within DCS.
Task List: Main Tasks: mission, AttackGroup, AttackUnit, Bombing, CarpetBombing, AttackMapObject, BombingRunway, orbit, refueling, land, follow, followBigFormation, escort, Embarking, fireAtPoint, hold, FAC_AttackGroup, EmbarkToTransport, DisembarkFromTransport, CargoTransportation, goToWaypoint

En-route Tasks: engageTargets, engageTargetsInZone, engageGroup, engageUnit, awacs, tanker, ewr, FAC_engageGroup, FAC

Commands: script, setCallsign, setFrequency, switchWaypoint, stopRoute, switchAction, setInvisible, setImmortal, activateBeacon, deactivateBeacon, eplrs, start, transmitMessage, stopTransmission

Options: ROE, Reaction To Threat, Radar Using, Flare Using, Formation, RTB On Bingo, silence, Disperse on Attack, Alarm State, RTB on Out of Ammo, ECM Using, Prohibit AA, Prohibit Jettison, Prohibit Afterburner, Prohibit AG, Missile Attack Range, Prohibit WP Pass Report, Engage Air Weapons