- Fixed bug in parking spot distance for ships.
- Added enroute  anti-ship task for anti-ship missions.
This commit is contained in:
Frank
2022-07-18 22:59:49 +02:00
parent f23416dfb8
commit 888734b7d1
5 changed files with 81 additions and 11 deletions

View File

@@ -1557,6 +1557,27 @@ function CONTROLLABLE:EnRouteTaskEngageTargetsInZone( Vec2, Radius, TargetTypes,
return DCSTask
end
--- (AIR) Enroute anti-ship task.
-- @param #CONTROLLABLE self
-- @param DCS#AttributeNameArray TargetTypes Array of target categories allowed to engage. Default `{"Ships"}`.
-- @param #number Priority (Optional) All en-route tasks have the priority parameter. This is a number (less value - higher priority) that determines actions related to what task will be performed first. Default 0.
-- @return DCS#Task The DCS task structure.
function CONTROLLABLE:EnRouteTaskAntiShip(TargetTypes, Priority)
local DCSTask = {
id = 'EngageTargets',
key = "AntiShip",
--auto = false,
--enabled = true,
params = {
targetTypes = TargetTypes or {"Ships"},
priority = Priority or 0
}
}
return DCSTask
end
--- (AIR) Engaging a controllable. The task does not assign the target controllable to the unit/controllable to attack now; it just allows the unit/controllable to engage the target controllable as well as other assigned targets.
-- @param #CONTROLLABLE self