DCS task carpetBombing

From DCS World Wiki - Hoggitworld.com

Task: CarpetBombing Added with: 2.1
Hierarchy: Scripting Root > Tasks > Main task > CarpetBombing
Tasking Type: Main task
For: Airplanes
Available Under: Ground Attack
Description: Assigns a point on the ground for which the AI will attack. Similar to the bombing task, but with more control over target area. Can be combined with follow big formation task for all participating aircraft to simultaneously bomb a target.

In the mission editor this task is call "WW2 Carpet Bombing". This task is not limited to WW2 aircraft.

Attack direction is assumed to be from the point where the task is assigned.

Format: This task needs to be in the following format.
Bombing = { 
 id = 'CarpetBombing', 
 params = { 
   attackType = string,
   carpetLength = number,
   point = Vec2,
   weaponType = number, 
   expend = enum AI.Task.WeaponExpend,
   attackQty = number, 
   attackQtyLimit = boolean,
   groupAttack = boolean, 
   altitude = number
   altitudeEnabled = boolean,

Required parameters: point: vec2 coordinate of the target. Can also be an x and y values directly in params table.

attackQty: Number of times the group will attack if the target.

carpetLength: Distance in meters the pattern should cover. Depending on the number of bombs available this value will scale the time between each bomb is dropped.

attackType: 'Carpet'

-- Note by Grimes: I don't really know why attackType is a value or even if it is required. As far as I am aware this is the only task that uses the attackType variable.

Optional Parameters: All other variables are optional. Some variables require other entries, for example the boolean values require the corresponding value if the boolean is true.

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

attackQtyLimit: boolean that defines whether or not the attackQty value will be used.

groupAttack: If true then each aircraft in the group will attack the point.

altitude: Number in meters at which you want the aircraft to engage from

altitudeEnabled: Boolean value for whether or not the altitude check applies

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


"QUARTER" = "Quarter"
"TWO"     = "Two"
"ONE"     = "One"
"FOUR"    = "Four"
"HALF"    = "Half"
"ALL"     = "All"
Examples: The following will make the group "droneyTheDrone" destroy a bridge with a pair of guided bombs.
 local target = {}
 target.point = {x = trigger.misc.getZone('bridge').point.x, y = trigger.misc.getZone('bridge').point.z}
 target.expend = "Two"
 target.weaponType = 16
 target.attackQty = 1
 target.attackQtyLimit = true
 local engage = {id = 'CarpetBombing', params = target}
Notes: See article Mission Editor: AI Tasking for more information on how AI tasking is handled within DCS.
Task List: Task Wrappers: mission, ComboTask, ControlledTask, WrappedAction

Tasks: AttackGroup, AttackUnit, Bombing, Strafing, 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, setFrequencyForUnit, switchWaypoint, stopRoute, switchAction, setInvisible, setImmortal, setUnlimitedFuel, 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, Prefer Vertical