DCS task engageUnit

From DCS World Wiki - Hoggitworld.com

Task: engageUnit Added with: 1.2.4
Hierarchy: Scripting Root > Tasks > enroute task > engageUnit
Tasking Type: enroute task
For: Airplanes, Helicopters
Available Under: CAP, CAS, SEAD, Anti-ship, Fighter Sweep, AFAC
Description: Assigns the controlled group to search for and engage a specific unit. The target must be detected in order for AI to engage it.
Format: This task needs to be in the following format.
EngageUnit = { 
  id = 'EngageUnit', 
  params = { 
    unitId = UnitId, 
    weaponType = number, 
    expend = enum AI.Task.WeaponExpend, 
    attackQty = number, 
    direction = Azimuth, 
    attackQtyLimit = boolean, 
    groupAttack = boolean, 
    priority = number 

Required parameters:

unitId: Unique identifier of the target unit.

Optional Parameters:

weaponType: Defines the preferred weapon of choice to engage the enemy.

priority: The priority of the tasking, the lower the number the more important the objective is. Helps define the order in which AI will execute tasking. By default the value is 0.

expend: Enum that defines how much munitions the AI will expend per attack run.

attackQtyLimit: boolean value that defines if the attack quantity limit is enabled.

attackQty: Number of times the group will attack if the target is still alive and AI still have ammo. attackQtyLimit must be true.

direction: defines the direction from which the flight will engage from

groupAttack: If true then each aircraft in the group will attack the unit. By default only a single aircraft will attack each unit. Useful for attacking ships like the Moscow where you must literally shoot 20 missiles at it in order to beat its defenses.

Enumerators: weaponType is a number associated with a correspond weapons flags


"QUARTER" = "Quarter"
"TWO"     = "Two"
"ONE"     = "One"
"FOUR"    = "Four"
"HALF"    = "Half"
"ALL"     = "All"
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, groundEscort, RecoveryTanker

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

Commands: script, setCallsign, setFrequency, switchWaypoint, stopRoute, switchAction, setInvisible, setImmortal, activateBeacon, deactivateBeacon, activateICLS, deactivateICLS, eplrs, start, transmitMessage, stopTransmission, smoke_on_off, ActivateLink4, deactivateLink4, activateACLS, deactivateACLS, LoadingShip

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, Option Radio Usage Contact, Option Radio Usage Engage, Option Radio Usage Kill, AC Engagement Range Restriction, jett tanks if empty, forced attack, Altitude Restriction for AAA Min, restrict targets, Altitude Restriction for AAA Max