Merge remote-tracking branch 'refs/remotes/origin/master' into 553-player-reports

This commit is contained in:
FlightControl 2017-05-29 07:02:40 +02:00
commit 1935bd235e
20 changed files with 573 additions and 214 deletions

View File

@ -157,17 +157,49 @@ do -- ACT_ROUTE
-- @param Wrapper.Controllable#CONTROLLABLE Controllable
-- @return #string
function ACT_ROUTE:GetRouteText( Controllable )
self:E()
local RouteText = ""
local Coordinate = nil -- Core.Point#COORDINATE
if self.Coordinate then
RouteText = self.Coordinate:ToString( Controllable )
Coordinate = self.Coordinate
end
if self.Zone then
local Coordinate = self.Zone:GetPointVec3( self.Altitude )
Coordinate = self.Zone:GetPointVec3( self.Altitude )
Coordinate:SetHeading( self.Heading )
RouteText = Coordinate:ToString( Controllable )
end
local CC = self:GetTask():GetMission():GetCommandCenter()
if CC then
if CC:IsModeWWII() then
-- Find closest reference point to the target.
local ShortestDistance = 0
local ShortestReferencePoint = nil
local ShortestReferenceName = ""
self:E( { CC.ReferencePoints } )
for ZoneName, Zone in pairs( CC.ReferencePoints ) do
self:E( { ZoneName = ZoneName } )
local Zone = Zone -- Core.Zone#ZONE
local ZoneCoord = Zone:GetCoordinate()
local ZoneDistance = ZoneCoord:Get2DDistance( self.Coordinate )
self:E( { ShortestDistance, ShortestReferenceName } )
if ShortestDistance == 0 or ZoneDistance < ShortestDistance then
ShortestDistance = ZoneDistance
ShortestReferencePoint = ZoneCoord
ShortestReferenceName = CC.ReferenceNames[ZoneName]
end
end
if ShortestReferencePoint then
RouteText = Coordinate:ToStringFromRP( ShortestReferencePoint, ShortestReferenceName, Controllable )
end
else
RouteText = self.Coordinate:ToString( Controllable )
end
end
return RouteText

View File

@ -13,9 +13,9 @@
--
-- # Demo Missions
--
-- ### [CARGO Demo Missions source code]()
-- ### [CARGO Demo Missions source code](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master-release/CGO%20-%20Cargo)
--
-- ### [CARGO Demo Missions, only for beta testers]()
-- ### [CARGO Demo Missions, only for beta testers](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/CGO%20-%20Cargo)
--
-- ### [ALL Demo Missions pack of the last release](https://github.com/FlightControl-Master/MOOSE_MISSIONS/releases)
--
@ -23,7 +23,7 @@
--
-- # YouTube Channel
--
-- ### [SPAWNSTATIC YouTube Channel]()
-- ### [CARGO YouTube Channel](https://www.youtube.com/watch?v=tM00lTlkpYs&list=PL7ZUrU4zZUl2zUTuKrLW5RsO9zLMqUtbf)
--
-- ====
--

View File

@ -64,6 +64,7 @@ DATABASE = {
COUNTRY_NAME = {},
NavPoints = {},
PLAYERSETTINGS = {},
ZONENAMES = {},
}
local _DATABASECoalition =
@ -1024,6 +1025,11 @@ function DATABASE:_RegisterTemplates()
end --if coa_name == 'red' or coa_name == 'blue' and type(coa_data) == 'table' then
end --for coa_name, coa_data in pairs(mission.coalition) do
for ZoneID, ZoneData in pairs( env.mission.triggers.zones ) do
local ZoneName = ZoneData.name
self.ZONENAMES[ZoneName] = ZoneName
end
return self
end

View File

@ -62,6 +62,7 @@ do -- COORDINATE
--- @type COORDINATE
-- @extends Core.Base#BASE
--- # COORDINATE class, extends @{Base#BASE}
--
-- COORDINATE defines a 3D point in the simulator and with its methods, you can use or manipulate the point in 3D space.
@ -182,7 +183,7 @@ do -- COORDINATE
-- @param #COORDINATE self
-- @param Dcs.DCSTypes#Vec2 Vec2 The Vec2 point.
-- @param Dcs.DCSTypes#Distance LandHeightAdd (optional) The default height if required to be evaluated will be the land height of the x, y coordinate. You can specify an extra height to be added to the land height.
-- @return Core.Point#COORDINATE
-- @return #COORDINATE
function COORDINATE:NewFromVec2( Vec2, LandHeightAdd )
local LandHeight = land.getHeight( Vec2 )
@ -204,9 +205,8 @@ do -- COORDINATE
-- @return Core.Point#COORDINATE
function COORDINATE:NewFromVec3( Vec3 )
local self = self:New( Vec3.x, Vec3.y, Vec3.z )
local self = self:New( Vec3.x, Vec3.y, Vec3.z ) -- #COORDINATE
--local self = BASE:Inherit( self, POINT_VEC3:NewFromVec3( Vec3 ) ) -- Core.Point#COORDINATE
self:F2( self )
return self
@ -773,6 +773,37 @@ do -- COORDINATE
return "MGRS, " .. UTILS.tostringMGRS( MGRS, MGRS_Accuracy )
end
--- Provides a coordinate string of the point, based on a coordinate format system:
-- * Uses default settings in COORDINATE.
-- * Can be overridden if for a GROUP containing x clients, a menu was selected to override the default.
-- @param #COORDINATE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable
-- @param Core.Settings#SETTINGS Settings
-- @return #string The coordinate Text in the configured coordinate system.
function COORDINATE:ToStringFromRP( ReferenceCoord, ReferenceName, Controllable, Settings ) -- R2.2
self:E( { ReferenceCoord = ReferenceCoord, ReferenceName = ReferenceName } )
local Settings = Settings or ( Controllable and _DATABASE:GetPlayerSettings( Controllable:GetPlayerName() ) ) or _SETTINGS
local IsAir = Controllable and Controllable:IsAirPlane() or false
if IsAir then
local DirectionVec3 = ReferenceCoord:GetDirectionVec3( self )
local AngleRadians = self:GetAngleRadians( DirectionVec3 )
local Distance = self:Get2DDistance( ReferenceCoord )
return "Targets are the last seen " .. self:GetBRText( AngleRadians, Distance, Settings ) .. " from " .. ReferenceName
else
local DirectionVec3 = ReferenceCoord:GetDirectionVec3( self )
local AngleRadians = self:GetAngleRadians( DirectionVec3 )
local Distance = self:Get2DDistance( ReferenceCoord )
return "Target are located " .. self:GetBRText( AngleRadians, Distance, Settings ) .. " from " .. ReferenceName
end
return nil
end
--- Provides a coordinate string of the point, based on a coordinate format system:
-- * Uses default settings in COORDINATE.
-- * Can be overridden if for a GROUP containing x clients, a menu was selected to override the default.
@ -1107,7 +1138,7 @@ do -- POINT_VEC2
LandHeightAdd = LandHeightAdd or 0
LandHeight = LandHeight + LandHeightAdd
local self = BASE:Inherit( self, COORDINATE:NewFromVec2( Vec2, LandHeightAdd ) ) -- Core.Point#POINT_VEC2
local self = BASE:Inherit( self, COORDINATE:NewFromVec2( Vec2, LandHeightAdd ) ) -- #POINT_VEC2
self:F2( self )
return self
@ -1119,9 +1150,7 @@ do -- POINT_VEC2
-- @return Core.Point#POINT_VEC2 self
function POINT_VEC2:NewFromVec3( Vec3 )
local self = BASE:Inherit( self, BASE:New() )
local self = BASE:Inherit( self, COORDINATE:New( Vec3.x, Vec3.y, Vec3.z ) ) -- Core.Point#POINT_VEC2
local self = BASE:Inherit( self, COORDINATE:NewFromVec3( Vec3 ) ) -- #POINT_VEC2
self:F2( self )
return self

View File

@ -225,7 +225,6 @@ end
--- Returns a @{Point#COORDINATE} of the zone.
-- @param #ZONE_BASE self
-- @param Dcs.DCSTypes#Distance Height The height to add to the land height where the center of the zone is located.
-- @return Core.Point#COORDINATE The Coordinate of the zone.
function ZONE_BASE:GetCoordinate()
self:F2( self.ZoneName )

View File

@ -519,9 +519,11 @@ do -- DETECTION_BASE
self.DetectionRun = 0
self:UnIdentifyAllDetectedObjects() -- Resets the DetectedObjectsIdentified table
local DetectionTimeStamp = timer.getTime()
for DetectionGroupID, DetectionGroupData in pairs( self.DetectionSetGroup:GetSet() ) do
--self:E( { DetectionGroupData } )
self:__DetectionGroup( DetectDelay, DetectionGroupData ) -- Process each detection asynchronously.
self:__DetectionGroup( DetectDelay, DetectionGroupData, DetectionTimeStamp ) -- Process each detection asynchronously.
self.DetectionCount = self.DetectionCount + 1
DetectDelay = DetectDelay + 0.1
end
@ -532,7 +534,7 @@ do -- DETECTION_BASE
-- @param #string Event The Event string.
-- @param #string To The To State string.
-- @param Wrapper.Group#GROUP DetectionGroup The Group detecting.
function DETECTION_BASE:onafterDetectionGroup( From, Event, To, DetectionGroup )
function DETECTION_BASE:onafterDetectionGroup( From, Event, To, DetectionGroup, DetectionTimeStamp )
self:E( { From, Event, To } )
self.DetectionRun = self.DetectionRun + 1
@ -557,7 +559,7 @@ do -- DETECTION_BASE
self.DetectDLINK
)
self:T( DetectedTargets )
self:F( DetectedTargets )
for DetectionObjectID, Detection in pairs( DetectedTargets ) do
local DetectedObject = Detection.object -- Dcs.DCSWrapper.Object#Object
@ -592,7 +594,7 @@ do -- DETECTION_BASE
local DetectedUnitCategory = DetectedObject:getDesc().category
self:T2( { "Detected Target:", DetectionGroupName, DetectedObjectName, Distance, DetectedUnitCategory } )
self:F( { "Detected Target:", DetectionGroupName, DetectedObjectName, Distance, DetectedUnitCategory } )
-- Calculate Acceptance
@ -676,6 +678,7 @@ do -- DETECTION_BASE
self.DetectedObjects[DetectedObjectName] = self.DetectedObjects[DetectedObjectName] or {}
self.DetectedObjects[DetectedObjectName].Name = DetectedObjectName
self.DetectedObjects[DetectedObjectName].IsDetected = TargetIsDetected
self.DetectedObjects[DetectedObjectName].IsVisible = TargetIsVisible
self.DetectedObjects[DetectedObjectName].LastTime = TargetLastTime
self.DetectedObjects[DetectedObjectName].LastPos = TargetLastPos
@ -683,6 +686,7 @@ do -- DETECTION_BASE
self.DetectedObjects[DetectedObjectName].KnowType = TargetKnowType
self.DetectedObjects[DetectedObjectName].KnowDistance = Detection.distance -- TargetKnowDistance
self.DetectedObjects[DetectedObjectName].Distance = Distance
self.DetectedObjects[DetectedObjectName].DetectionTimeStamp = DetectionTimeStamp
local DetectedUnit = UNIT:FindByName( DetectedObjectName )
@ -706,9 +710,23 @@ do -- DETECTION_BASE
if self.DetectionCount > 0 and self.DetectionRun == self.DetectionCount then
self:T( "--> Create Detection Sets" )
-- First check if all DetectedObjects were detected.
-- This is important. When there are DetectedObjects in the list, but were not detected,
-- And these remain undetected for more than 60 seconds, then these DetectedObjects will be flagged as not Detected.
-- IsDetected = false!
-- This is used in A2A_TASK_DISPATCHER to initiate fighter sweeping! The TASK_A2A_INTERCEPT tasks will be replaced with TASK_A2A_SWEEP tasks.
for DetectedObjectName, DetectedObject in pairs( self.DetectedObjects ) do
if self.DetectedObjects[DetectedObjectName].IsDetected == true and self.DetectedObjects[DetectedObjectName].DetectionTimeStamp + 60 <= DetectionTimeStamp then
self.DetectedObjects[DetectedObjectName].IsDetected = false
end
end
self:CreateDetectionItems() -- Polymorphic call to Create/Update the DetectionItems list for the DETECTION_ class grouping method.
self:CleanDetectionItems() -- Any DetectionItem that has a Set with zero elements in it, must be removed from the DetectionItems list.
for DetectedItemID, DetectedItem in pairs( self.DetectedItems ) do
self:UpdateDetectedItemDetection( DetectedItem )
self:CleanDetectionItem( DetectedItem, DetectedItemID ) -- Any DetectionItem that has a Set with zero elements in it, must be removed from the DetectionItems list.
end
self:__Detect( self.DetectionInterval )
end
@ -720,23 +738,19 @@ do -- DETECTION_BASE
do -- DetectionItems Creation
--- Make a DetectionSet table. This function will be overridden in the derived clsses.
-- Clean the DetectedItem table.
-- @param #DETECTION_BASE self
-- @return #DETECTION_BASE
function DETECTION_BASE:CleanDetectionItems() --R2.1 Clean the DetectionItems list
function DETECTION_BASE:CleanDetectionItem( DetectedItem, DetectedItemID )
self:F2()
-- We clean all DetectedItems.
-- if there are any remaining DetectedItems with no Set Objects then the Item in the DetectedItems must be deleted.
for DetectedItemID, DetectedItemData in pairs( self.DetectedItems ) do
local DetectedItem = DetectedItemData -- #DETECTION_BASE.DetectedItem
local DetectedSet = DetectedItem.Set
if DetectedSet:Count() == 0 then
self:RemoveDetectedItem(DetectedItemID)
end
local DetectedSet = DetectedItem.Set
if DetectedSet:Count() == 0 then
self:RemoveDetectedItem( DetectedItemID )
end
return self
@ -1160,7 +1174,7 @@ do -- DETECTION_BASE
--- @param Wrapper.Unit#UNIT PlayerUnit
function( PlayerUnitName )
local PlayerUnit = UNIT:FindByName( PlayerUnitName )
if PlayerUnit:IsInZone(DetectionZone) then
if PlayerUnit and PlayerUnit:IsInZone(DetectionZone) then
DetectedItem.FriendliesNearBy = DetectedItem.FriendliesNearBy or {}
local PlayerUnitName = PlayerUnit:GetName()
DetectedItem.PlayersNearBy = DetectedItem.PlayersNearBy or {}
@ -1368,6 +1382,37 @@ do -- DETECTION_BASE
return nil
end
--- Set IsDetected flag for all DetectedItems.
-- @param #DETECTION_BASE self
-- @return #DETECTION_BASE.DetectedItem DetectedItem
-- @return #boolean true if at least one UNIT is detected from the DetectedSet, false if no UNIT was detected from the DetectedSet.
function DETECTION_BASE:UpdateDetectedItemDetection( DetectedItem )
local IsDetected = false
for UnitName, UnitData in pairs( DetectedItem.Set:GetSet() ) do
local DetectedObject = self.DetectedObjects[UnitName]
if DetectedObject.IsDetected then
IsDetected = true
break
end
end
self:F( { IsDetected = DetectedItem.IsDetected } )
DetectedItem.IsDetected = IsDetected
return IsDetected
end
--- Checks if there is at least one UNIT detected in the Set of the the DetectedItem.
-- @param #DETECTION_BASE self
-- @return #boolean true if at least one UNIT is detected from the DetectedSet, false if no UNIT was detected from the DetectedSet.
function DETECTION_BASE:IsDetectedItemDetected( DetectedItem )
return DetectedItem.IsDetected
end
do -- Coordinates
--- Get the COORDINATE of a detection item using a given numeric index.
@ -2195,7 +2240,7 @@ do -- DETECTION_AREAS
DetectedItem.NearestFAC = NearestFAC
end
--- Returns the A2G threat level of the units in the DetectedItem
-- @param #DETECTION_AREAS self
-- @param #DETECTION_BASE.DetectedItem DetectedItem
@ -2325,6 +2370,7 @@ do -- DETECTION_AREAS
for DetectedItemID, DetectedItemData in pairs( self.DetectedItems ) do
local DetectedItem = DetectedItemData -- #DETECTION_BASE.DetectedItem
if DetectedItem then
self:T( { "Detected Item ID:", DetectedItemID } )
@ -2489,7 +2535,7 @@ do -- DETECTION_AREAS
self:ReportFriendliesNearBy( { DetectedItem = DetectedItem, ReportSetGroup = self.DetectionSetGroup } ) -- Fill the Friendlies table
self:CalculateThreatLevelA2G( DetectedItem ) -- Calculate A2G threat level
self:NearestFAC( DetectedItem )
if DETECTION_AREAS._SmokeDetectedUnits or self._SmokeDetectedUnits then
DetectedZone.ZoneUNIT:SmokeRed()
end

View File

@ -855,7 +855,10 @@ function SPAWN:SpawnWithIndex( SpawnIndex )
-- If there is a SpawnFunction hook defined, call it.
if self.SpawnFunctionHook then
self.SpawnFunctionHook( self.SpawnGroups[self.SpawnIndex].Group, unpack( self.SpawnFunctionArguments ) )
-- delay calling this for .1 seconds so that it hopefully comes after the BIRTH event of the group.
self.SpawnHookScheduler = SCHEDULER:New()
self.SpawnHookScheduler:Schedule( nil, self.SpawnFunctionHook, { self.SpawnGroups[self.SpawnIndex].Group, unpack( self.SpawnFunctionArguments)}, 0.1 )
-- self.SpawnFunctionHook( self.SpawnGroups[self.SpawnIndex].Group, unpack( self.SpawnFunctionArguments ) )
end
-- TODO: Need to fix this by putting an "R" in the name of the group when the group repeats.
--if self.Repeat then

View File

@ -91,6 +91,9 @@ COMMANDCENTER = {
CommandCenterCoalition = nil,
CommandCenterPositionable = nil,
Name = "",
ReferencePoints = {},
ReferenceNames = {},
CommunicationMode = "80",
}
--- The constructor takes an IDENTIFIABLE as the HQ command center.
-- @param #COMMANDCENTER self
@ -253,6 +256,46 @@ function COMMANDCENTER:RemoveMission( Mission )
return Mission
end
--- Set reference points known by the command center to guide airborne units during WWII.
-- These reference points are zones, with a special name.
-- @param #COMMANDCENTER self
-- @param #string ReferenceZonePrefix Reference points.
-- @return #COMMANDCENTER
function COMMANDCENTER:SetReferenceZones( ReferenceZonePrefix )
local MatchPattern = "(.*)#(.*)"
self:F( { MatchPattern = MatchPattern } )
for ReferenceZoneName in pairs( _DATABASE.ZONENAMES ) do
local ZoneName, ReferenceName = string.match( ReferenceZoneName, MatchPattern )
self:F( { ZoneName = ZoneName, ReferenceName = ReferenceName } )
if ZoneName and ReferenceName and ZoneName == ReferenceZonePrefix then
self.ReferencePoints[ReferenceZoneName] = ZONE:New( ReferenceZoneName )
self.ReferenceNames[ReferenceZoneName] = ReferenceName
end
end
return self
end
--- Set the commandcenter operations in WWII mode
-- This will disable LL, MGRS, BRA, BULLS from the settings.
-- It will also disable the settings at the settings menu for these.
-- And, it will use any ReferenceZones set as reference points for communication.
-- @param #COMMANDCENTER self
-- @return #COMMANDCENTER
function COMMANDCENTER:SetModeWWII()
self.CommunicationMode = "WWII"
end
--- Returns if the commandcenter operations is in WWII mode
-- @param #COMMANDCENTER self
-- @return #boolean true if in WWII mode.
function COMMANDCENTER:IsModeWWII()
return self.CommunicationMode == "WWII"
end
--- Sets the menu structure of the Missions governed by the HQ command center.
-- @param #COMMANDCENTER self
function COMMANDCENTER:SetMenu()

View File

@ -384,6 +384,53 @@ do -- TASK_A2A_INTERCEPT
end
do -- TASK_A2A_SWEEP
--- The TASK_A2A_SWEEP class
-- @type TASK_A2A_SWEEP
-- @field Set#SET_UNIT TargetSetUnit
-- @extends Tasking.Task#TASK
TASK_A2A_SWEEP = {
ClassName = "TASK_A2A_SWEEP",
}
--- Instantiates a new TASK_A2A_SWEEP.
-- @param #TASK_A2A_SWEEP self
-- @param Tasking.Mission#MISSION Mission
-- @param Core.Set#SET_GROUP SetGroup The set of groups for which the Task can be assigned.
-- @param #string TaskName The name of the Task.
-- @param Core.Set#SET_UNIT TargetSetUnit
-- @param #string TaskBriefing The briefing of the task.
-- @return #TASK_A2A_SWEEP self
function TASK_A2A_SWEEP:New( Mission, SetGroup, TaskName, TargetSetUnit, TaskBriefing )
local self = BASE:Inherit( self, TASK_A2A:New( Mission, SetGroup, TaskName, TargetSetUnit, "INTERCEPT", TaskBriefing ) ) -- #TASK_A2A_SWEEP
self:F()
Mission:AddTask( self )
--TODO: Add BR, Altitude, type of planes...
self:SetBriefing(
TaskBriefing or
"Perform a fighter sweep. Incoming intruders were detected and could be hiding at the location.\n"
)
local TargetCoordinate = TargetSetUnit:GetFirst():GetCoordinate()
self:SetInfo( "Coordinates", TargetCoordinate )
self:SetInfo( "Assumed Threat", "[" .. string.rep( "", TargetSetUnit:CalculateThreatLevelA2G() ) .. "]" )
local DetectedItemsCount = TargetSetUnit:Count()
local DetectedItemsTypes = TargetSetUnit:GetTypeNames()
self:SetInfo( "Lost Targets", string.format( "%d of %s", DetectedItemsCount, DetectedItemsTypes ) )
return self
end
end
do -- TASK_A2A_ENGAGE
--- The TASK_A2A_ENGAGE class

View File

@ -1,35 +1,6 @@
--- **Tasking** - The TASK_A2A_DISPATCHER creates and manages player TASK_A2A tasks based on detected targets.
--
-- ===
--
-- # 1) @{#TASK_A2A_DISPATCHER} class, extends @{#DETECTION_MANAGER}
--
-- The @{#TASK_A2A_DISPATCHER} class implements the dynamic dispatching of tasks upon groups of detected units determined a @{Set} of EWR installation groups.
-- The EWR will detect units, will group them, and will dispatch @{Task}s to groups. Depending on the type of target detected, different tasks will be dispatched.
-- Find a summary below describing for which situation a task type is created:
--
-- * **INTERCEPT Task**: Is created when the target is known, is detected and within a danger zone, and there is no friendly airborne in range.
-- * **SWEEP Task**: Is created when the target is unknown, was detected and the last position is only known, and within a danger zone, and there is no friendly airborne in range.
-- * **ENGAGE Task**: Is created when the target is known, is detected and within a danger zone, and there is a friendly airborne in range, that will receive this task.
--
-- Other task types will follow...
--
-- 3.1) TASK_A2A_DISPATCHER constructor:
-- --------------------------------------
-- The @{#TASK_A2A_DISPATCHER.New}() method creates a new TASK_A2A_DISPATCHER instance.
--
-- ===
--
-- # **API CHANGE HISTORY**
--
-- The underlying change log documents the API changes. Please read this carefully. The following notation is used:
--
-- * **Added** parts are expressed in bold type face.
-- * _Removed_ parts are expressed in italic type face.
--
-- Hereby the change log:
--
-- ===
--
-- # **AUTHORS and CONTRIBUTIONS**
--
@ -45,15 +16,31 @@ do -- TASK_A2A_DISPATCHER
--- TASK_A2A_DISPATCHER class.
-- @type TASK_A2A_DISPATCHER
-- @field Set#SET_GROUP SetGroup The groups to which the FAC will report to.
-- @field Functional.Detection#DETECTION_BASE Detection The DETECTION_BASE object that is used to report the detected objects. The Detection object will only function in RADAR mode!!!
-- @field Tasking.Mission#MISSION Mission
-- @extends Tasking.DetectionManager#DETECTION_MANAGER
--- # TASK_A2A_DISPATCHER class, extends @{Tasking#DETECTION_MANAGER}
--
-- The @{#TASK_A2A_DISPATCHER} class implements the dynamic dispatching of tasks upon groups of detected units determined a @{Set} of EWR installation groups.
-- The EWR will detect units, will group them, and will dispatch @{Task}s to groups. Depending on the type of target detected, different tasks will be dispatched.
-- Find a summary below describing for which situation a task type is created:
--
-- * **INTERCEPT Task**: Is created when the target is known, is detected and within a danger zone, and there is no friendly airborne in range.
-- * **SWEEP Task**: Is created when the target is unknown, was detected and the last position is only known, and within a danger zone, and there is no friendly airborne in range.
-- * **ENGAGE Task**: Is created when the target is known, is detected and within a danger zone, and there is a friendly airborne in range, that will receive this task.
--
-- Other task types will follow...
--
-- # TASK_A2A_DISPATCHER constructor:
-- --------------------------------------
-- The @{#TASK_A2A_DISPATCHER.New}() method creates a new TASK_A2A_DISPATCHER instance.
--
-- @field #TASK_A2A_DISPATCHER
TASK_A2A_DISPATCHER = {
ClassName = "TASK_A2A_DISPATCHER",
Mission = nil,
Detection = nil,
Tasks = {},
SweepZones = {},
}
@ -71,6 +58,8 @@ do -- TASK_A2A_DISPATCHER
self.Detection = Detection
self.Mission = Mission
-- TODO: Check detection through radar.
self.Detection:FilterCategories( Unit.Category.AIRPLANE, Unit.Category.HELICOPTER )
--self.Detection:InitDetectRadar( true )
self.Detection:SetDetectionInterval( 30 )
@ -104,10 +93,11 @@ do -- TASK_A2A_DISPATCHER
local DetectedSet = DetectedItem.Set
local DetectedZone = DetectedItem.Zone
-- Check if there is at least one UNIT in the DetectedSet is visible.
if DetectedItem.IsDetected == true then
if true then
-- Here we're doing something advanced... We're copying the DetectedSet, but making a new Set only with SEADable Radar units in it.
-- Here we're doing something advanced... We're copying the DetectedSet.
local TargetSetUnit = SET_UNIT:New()
TargetSetUnit:SetDatabase( DetectedSet )
TargetSetUnit:FilterOnce() -- Filter but don't do any events!!! Elements are added manually upon each detection.
@ -117,6 +107,33 @@ do -- TASK_A2A_DISPATCHER
return nil
end
--- Creates an SWEEP task when there are targets for it.
-- @param #TASK_A2A_DISPATCHER self
-- @param Functional.Detection#DETECTION_BASE.DetectedItem DetectedItem
-- @return Set#SET_UNIT TargetSetUnit: The target set of units.
-- @return #nil If there are no targets to be set.
function TASK_A2A_DISPATCHER:EvaluateSWEEP( DetectedItem )
self:F( { DetectedItem.ItemID } )
local DetectedSet = DetectedItem.Set
local DetectedZone = DetectedItem.Zone
if DetectedItem.IsDetected == false then
-- Here we're doing something advanced... We're copying the DetectedSet.
local TargetSetUnit = SET_UNIT:New()
TargetSetUnit:SetDatabase( DetectedSet )
TargetSetUnit:FilterOnce() -- Filter but don't do any events!!! Elements are added manually upon each detection.
return TargetSetUnit
end
return nil
end
--- Creates an ENGAGE task when there are human friendlies airborne near the targets.
-- @param #TASK_A2A_DISPATCHER self
@ -131,10 +148,11 @@ do -- TASK_A2A_DISPATCHER
local PlayersCount, PlayersReport = self:GetPlayerFriendliesNearBy( DetectedItem )
-- Only allow ENGAGE when there are Players near the zone, and when the Area has detected items since the last run in a 60 seconds time zone.
if PlayersCount > 0 and DetectedItem.IsDetected == true then
if PlayersCount > 0 then
-- Here we're doing something advanced... We're copying the DetectedSet, but making a new Set only with SEADable Radar units in it.
-- Here we're doing something advanced... We're copying the DetectedSet.
local TargetSetUnit = SET_UNIT:New()
TargetSetUnit:SetDatabase( DetectedSet )
TargetSetUnit:FilterOnce() -- Filter but don't do any events!!! Elements are added manually upon each detection.
@ -180,6 +198,15 @@ do -- TASK_A2A_DISPATCHER
if IsPlayers == true then
Remove = true
end
if DetectedItem.IsDetected == false then
Remove = true
end
end
if TaskType == "SWEEP" then
if DetectedItem.IsDetected == true then
Remove = true
end
end
local DetectedSet = DetectedItem.Set -- Core.Set#SET_UNIT
@ -350,6 +377,11 @@ do -- TASK_A2A_DISPATCHER
local TargetSetUnit = self:EvaluateINTERCEPT( DetectedItem ) -- Returns a SetUnit if there are targets to be INTERCEPTed...
if TargetSetUnit then
Task = TASK_A2A_INTERCEPT:New( Mission, self.SetGroup, string.format( "INTERCEPT.%03d", DetectedID ), TargetSetUnit )
else
local TargetSetUnit = self:EvaluateSWEEP( DetectedItem ) -- Returns a SetUnit
if TargetSetUnit then
Task = TASK_A2A_SWEEP:New( Mission, self.SetGroup, string.format( "SWEEP.%03d", DetectedID ), TargetSetUnit )
end
end
end

View File

@ -61,6 +61,7 @@
-- * @{#CONTROLLABLE.EnRouteTaskAWACS}: (AIR) Aircraft will act as an AWACS for friendly units (will provide them with information about contacts). No parameters.
-- * @{#CONTROLLABLE.EnRouteTaskEngageControllable}: (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.
-- * @{#CONTROLLABLE.EnRouteTaskEngageTargets}: (AIR) Engaging targets of defined types.
-- * @{#CONTROLLABLE.EnRouteTaskEngageTargetsInZone}: (AIR) Engaging a targets of defined types at circle-shaped zone.
-- * @{#CONTROLLABLE.EnRouteTaskEWR}: (AIR) Attack the Unit.
-- * @{#CONTROLLABLE.EnRouteTaskFAC}: (AIR + GROUND) The task makes the controllable/unit a FAC and lets the FAC to choose a targets (enemy ground controllable) around as well as other assigned targets.
-- * @{#CONTROLLABLE.EnRouteTaskFAC_EngageControllable}: (AIR + GROUND) The task makes the controllable/unit a FAC and lets the FAC to choose the target (enemy ground controllable) as well as other assigned targets.
@ -1088,7 +1089,7 @@ end
-- @param Dcs.DCSTypes#AttributeNameArray TargetTypes Array of target categories allowed to engage.
-- @param #number Priority 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.
-- @return Dcs.DCSTasking.Task#Task The DCS task structure.
function CONTROLLABLE:EnRouteTaskEngageTargets( Vec2, Radius, TargetTypes, Priority )
function CONTROLLABLE:EnRouteTaskEngageTargetsInZone( Vec2, Radius, TargetTypes, Priority )
self:F2( { self.ControllableName, Vec2, Radius, TargetTypes, Priority } )
-- EngageTargetsInZone = {

View File

@ -8,21 +8,21 @@
@K=function, @M=Task_A2G, @N=onafterEngage, @P=Fsm, @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_A2G.lua, @C=6215,
@K=function, @M=Task_A2G, @N=onafterRouteToTarget, @P=Fsm, @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_A2G.lua, @C=6537,
@K=function, @M=Task_A2G, @N=onafterRouteToTargets, @P=Fsm, @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_A2G.lua, @C=7416,
@K=function, @M=Task_Cargo, @N=onafterSelectAction, @P=Fsm, @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_CARGO.lua, @C=10673,
@K=function, @M=Task_Cargo, @N=OnLeaveWaitingForCommand, @P=Fsm, @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_CARGO.lua, @C=13702,
@K=function, @M=Task_Cargo, @N=onafterRouteToPickup, @P=Fsm, @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_CARGO.lua, @C=14474,
@K=function, @M=Task_Cargo, @N=onafterArriveAtPickup, @P=Fsm, @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_CARGO.lua, @C=15093,
@K=function, @M=Task_Cargo, @N=onafterCancelRouteToPickup, @P=Fsm, @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_CARGO.lua, @C=15634,
@K=function, @M=Task_Cargo, @N=onafterRouteToDeploy, @P=Fsm, @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_CARGO.lua, @C=15971,
@K=function, @M=Task_Cargo, @N=onafterArriveAtDeploy, @P=Fsm, @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_CARGO.lua, @C=16418,
@K=function, @M=Task_Cargo, @N=onafterCancelRouteToDeploy, @P=Fsm, @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_CARGO.lua, @C=16846,
@K=function, @M=Task_Cargo, @N=onafterLanded, @P=Fsm, @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_CARGO.lua, @C=18133,
@K=function, @M=Task_Cargo, @N=onafterPrepareBoarding, @P=Fsm, @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_CARGO.lua, @C=18899,
@K=function, @M=Task_Cargo, @N=onafterBoard, @P=Fsm, @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_CARGO.lua, @C=19359,
@K=function, @M=Task_Cargo, @N=onafterBoarded, @P=Fsm, @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_CARGO.lua, @C=20300,
@K=function, @M=Task_Cargo, @N=onafterPrepareUnBoarding, @P=Fsm, @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_CARGO.lua, @C=20983,
@K=function, @M=Task_Cargo, @N=onafterUnBoard, @P=Fsm, @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_CARGO.lua, @C=21943,
@K=function, @M=Task_Cargo, @N=onafterUnBoarded, @P=Fsm, @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_CARGO.lua, @C=22962,
@K=function, @M=Task_Cargo, @N=onafterSelectAction, @P=Fsm, @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_CARGO.lua, @C=10711,
@K=function, @M=Task_Cargo, @N=OnLeaveWaitingForCommand, @P=Fsm, @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_CARGO.lua, @C=13740,
@K=function, @M=Task_Cargo, @N=onafterRouteToPickup, @P=Fsm, @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_CARGO.lua, @C=14601,
@K=function, @M=Task_Cargo, @N=onafterArriveAtPickup, @P=Fsm, @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_CARGO.lua, @C=15222,
@K=function, @M=Task_Cargo, @N=onafterCancelRouteToPickup, @P=Fsm, @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_CARGO.lua, @C=15751,
@K=function, @M=Task_Cargo, @N=onafterRouteToDeploy, @P=Fsm, @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_CARGO.lua, @C=16088,
@K=function, @M=Task_Cargo, @N=onafterArriveAtDeploy, @P=Fsm, @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_CARGO.lua, @C=16535,
@K=function, @M=Task_Cargo, @N=onafterCancelRouteToDeploy, @P=Fsm, @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_CARGO.lua, @C=16963,
@K=function, @M=Task_Cargo, @N=onafterLanded, @P=Fsm, @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_CARGO.lua, @C=18250,
@K=function, @M=Task_Cargo, @N=onafterPrepareBoarding, @P=Fsm, @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_CARGO.lua, @C=19016,
@K=function, @M=Task_Cargo, @N=onafterBoard, @P=Fsm, @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_CARGO.lua, @C=19476,
@K=function, @M=Task_Cargo, @N=onafterBoarded, @P=Fsm, @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_CARGO.lua, @C=20417,
@K=function, @M=Task_Cargo, @N=onafterPrepareUnBoarding, @P=Fsm, @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_CARGO.lua, @C=21100,
@K=function, @M=Task_Cargo, @N=onafterUnBoard, @P=Fsm, @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_CARGO.lua, @C=22060,
@K=function, @M=Task_Cargo, @N=onafterUnBoarded, @P=Fsm, @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_CARGO.lua, @C=23079,
@K=function, @M=Designate, @N=OnBeforeLaseOn, @P=DESIGNATE , @F=../../../MOOSE/Moose Development/Moose\Functional\Designate.lua, @C=12218,
@K=function, @M=Designate, @N=OnAfterLaseOn, @P=DESIGNATE , @F=../../../MOOSE/Moose Development/Moose\Functional\Designate.lua, @C=12466,
@K=function, @M=Designate, @N=LaseOn, @P=DESIGNATE , @F=../../../MOOSE/Moose Development/Moose\Functional\Designate.lua, @C=12687,

1 @K=function @M=Task_A2A @N=onafterRouteToRendezVous @P=Fsm @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_A2A.lua @C=4756
8 @K=function @M=Task_A2G @N=onafterEngage @P=Fsm @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_A2G.lua @C=6215
9 @K=function @M=Task_A2G @N=onafterRouteToTarget @P=Fsm @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_A2G.lua @C=6537
10 @K=function @M=Task_A2G @N=onafterRouteToTargets @P=Fsm @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_A2G.lua @C=7416
11 @K=function @M=Task_Cargo @N=onafterSelectAction @P=Fsm @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_CARGO.lua @C=10673 @C=10711
12 @K=function @M=Task_Cargo @N=OnLeaveWaitingForCommand @P=Fsm @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_CARGO.lua @C=13702 @C=13740
13 @K=function @M=Task_Cargo @N=onafterRouteToPickup @P=Fsm @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_CARGO.lua @C=14474 @C=14601
14 @K=function @M=Task_Cargo @N=onafterArriveAtPickup @P=Fsm @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_CARGO.lua @C=15093 @C=15222
15 @K=function @M=Task_Cargo @N=onafterCancelRouteToPickup @P=Fsm @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_CARGO.lua @C=15634 @C=15751
16 @K=function @M=Task_Cargo @N=onafterRouteToDeploy @P=Fsm @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_CARGO.lua @C=15971 @C=16088
17 @K=function @M=Task_Cargo @N=onafterArriveAtDeploy @P=Fsm @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_CARGO.lua @C=16418 @C=16535
18 @K=function @M=Task_Cargo @N=onafterCancelRouteToDeploy @P=Fsm @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_CARGO.lua @C=16846 @C=16963
19 @K=function @M=Task_Cargo @N=onafterLanded @P=Fsm @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_CARGO.lua @C=18133 @C=18250
20 @K=function @M=Task_Cargo @N=onafterPrepareBoarding @P=Fsm @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_CARGO.lua @C=18899 @C=19016
21 @K=function @M=Task_Cargo @N=onafterBoard @P=Fsm @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_CARGO.lua @C=19359 @C=19476
22 @K=function @M=Task_Cargo @N=onafterBoarded @P=Fsm @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_CARGO.lua @C=20300 @C=20417
23 @K=function @M=Task_Cargo @N=onafterPrepareUnBoarding @P=Fsm @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_CARGO.lua @C=20983 @C=21100
24 @K=function @M=Task_Cargo @N=onafterUnBoard @P=Fsm @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_CARGO.lua @C=21943 @C=22060
25 @K=function @M=Task_Cargo @N=onafterUnBoarded @P=Fsm @F=../../../MOOSE/Moose Development/Moose\Tasking\Task_CARGO.lua @C=22962 @C=23079
26 @K=function @M=Designate @N=OnBeforeLaseOn @P=DESIGNATE @F=../../../MOOSE/Moose Development/Moose\Functional\Designate.lua @C=12218
27 @K=function @M=Designate @N=OnAfterLaseOn @P=DESIGNATE @F=../../../MOOSE/Moose Development/Moose\Functional\Designate.lua @C=12466
28 @K=function @M=Designate @N=LaseOn @P=DESIGNATE @F=../../../MOOSE/Moose Development/Moose\Functional\Designate.lua @C=12687

View File

@ -119,9 +119,9 @@
<h1>Demo Missions</h1>
<h3><a href="">CARGO Demo Missions source code</a></h3>
<h3><a href="https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master-release/CGO%20-%20Cargo">CARGO Demo Missions source code</a></h3>
<h3><a href="">CARGO Demo Missions, only for beta testers</a></h3>
<h3><a href="https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/CGO%20-%20Cargo">CARGO Demo Missions, only for beta testers</a></h3>
<h3><a href="https://github.com/FlightControl-Master/MOOSE_MISSIONS/releases">ALL Demo Missions pack of the last release</a></h3>
@ -129,7 +129,7 @@
<h1>YouTube Channel</h1>
<h3><a href="">SPAWNSTATIC YouTube Channel</a></h3>
<h3><a href="https://www.youtube.com/watch?v=tM00lTlkpYs&amp;list=PL7ZUrU4zZUl2zUTuKrLW5RsO9zLMqUtbf">CARGO YouTube Channel</a></h3>
<hr/>
@ -2924,6 +2924,7 @@ The range till cargo will board.</p>
<dl class="function">
<dt>
<em></em>
<a id="#(CARGO_UNIT).CargoCarrier" >
<strong>CARGO_UNIT.CargoCarrier</strong>
</a>
@ -3049,7 +3050,6 @@ The range till cargo will board.</p>
<dl class="function">
<dt>
<em>#number</em>
<a id="#(CARGO_UNIT).RunCount" >
<strong>CARGO_UNIT.RunCount</strong>
</a>

View File

@ -305,6 +305,12 @@
<td class="name" nowrap="nowrap"><a href="##(GROUP).GetMinHeight">GROUP:GetMinHeight()</a></td>
<td class="summary">
<p>Returns the current minimum height of the group.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(GROUP).GetPlayerName">GROUP:GetPlayerName()</a></td>
<td class="summary">
<p>Gets the player name of the group.</p>
</td>
</tr>
<tr>
@ -1103,6 +1109,24 @@ Minimum height found.</p>
<dl class="function">
<dt>
<a id="#(GROUP).GetPlayerName" >
<strong>GROUP:GetPlayerName()</strong>
</a>
</dt>
<dd>
<p>Gets the player name of the group.</p>
<h3>Return value</h3>
<p><em>#string:</em>
The player name of the group.</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(GROUP).GetPlayerNames" >
<strong>GROUP:GetPlayerNames()</strong>
</a>

View File

@ -301,6 +301,12 @@ A <a href="CLIENT.html">CLIENT</a> needs to be registered within the <a href="MI
<td class="name" nowrap="nowrap"><a href="##(MISSION).MissionBriefing">MISSION.MissionBriefing</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSION).MissionGoals">MISSION:MissionGoals()</a></td>
<td class="summary">
<p>MissionGoals Trigger for MISSION</p>
</td>
</tr>
<tr>
@ -337,6 +343,12 @@ A <a href="CLIENT.html">CLIENT</a> needs to be registered within the <a href="MI
<td class="name" nowrap="nowrap"><a href="##(MISSION).OnAfterFail">MISSION:OnAfterFail(From, Event, To)</a></td>
<td class="summary">
<p>OnAfter Transition Handler for Event Fail.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSION).OnAfterMissionGoals">MISSION:OnAfterMissionGoals(From, Event, To)</a></td>
<td class="summary">
<p>MissionGoals Handler OnAfter for MISSION</p>
</td>
</tr>
<tr>
@ -361,6 +373,12 @@ A <a href="CLIENT.html">CLIENT</a> needs to be registered within the <a href="MI
<td class="name" nowrap="nowrap"><a href="##(MISSION).OnBeforeFail">MISSION:OnBeforeFail(From, Event, To)</a></td>
<td class="summary">
<p>OnBefore Transition Handler for Event Fail.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSION).OnBeforeMissionGoals">MISSION:OnBeforeMissionGoals(From, Event, To)</a></td>
<td class="summary">
<p>MissionGoals Handler OnBefore for MISSION</p>
</td>
</tr>
<tr>
@ -523,6 +541,12 @@ A <a href="CLIENT.html">CLIENT</a> needs to be registered within the <a href="MI
<td class="name" nowrap="nowrap"><a href="##(MISSION).__Fail">MISSION:__Fail(Delay)</a></td>
<td class="summary">
<p>Asynchronous Event Trigger for Event Fail.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MISSION).__MissionGoals">MISSION:__MissionGoals(Delay)</a></td>
<td class="summary">
<p>MissionGoals Asynchronous Trigger for MISSION</p>
</td>
</tr>
<tr>
@ -1272,6 +1296,19 @@ The status</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MISSION).MissionGoals" >
<strong>MISSION:MissionGoals()</strong>
</a>
</dt>
<dd>
<p>MissionGoals Trigger for MISSION</p>
</dd>
</dl>
<dl class="function">
@ -1440,6 +1477,37 @@ The To State string.</p>
<dl class="function">
<dt>
<a id="#(MISSION).OnAfterMissionGoals" >
<strong>MISSION:OnAfterMissionGoals(From, Event, To)</strong>
</a>
</dt>
<dd>
<p>MissionGoals Handler OnAfter for MISSION</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em>#string From </em></code>: </p>
</li>
<li>
<p><code><em>#string Event </em></code>: </p>
</li>
<li>
<p><code><em>#string To </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MISSION).OnAfterStart" >
<strong>MISSION:OnAfterStart(From, Event, To)</strong>
</a>
@ -1581,6 +1649,42 @@ The To State string.</p>
<p><em>#boolean:</em>
Return false to cancel Transition.</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MISSION).OnBeforeMissionGoals" >
<strong>MISSION:OnBeforeMissionGoals(From, Event, To)</strong>
</a>
</dt>
<dd>
<p>MissionGoals Handler OnBefore for MISSION</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em>#string From </em></code>: </p>
</li>
<li>
<p><code><em>#string Event </em></code>: </p>
</li>
<li>
<p><code><em>#string To </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em>#boolean:</em></p>
</dd>
</dl>
<dl class="function">
@ -2325,6 +2429,27 @@ The delay in seconds.</p>
<dl class="function">
<dt>
<a id="#(MISSION).__MissionGoals" >
<strong>MISSION:__MissionGoals(Delay)</strong>
</a>
</dt>
<dd>
<p>MissionGoals Asynchronous Trigger for MISSION</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em>#number Delay </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MISSION).__Start" >
<strong>MISSION:__Start(Delay)</strong>
</a>

View File

@ -331,24 +331,6 @@
<td class="name" nowrap="nowrap"><a href="##(COORDINATE).IsLOS">COORDINATE:IsLOS(ToCoordinate)</a></td>
<td class="summary">
<p>Returns if a Coordinate has Line of Sight (LOS) with the ToCoordinate.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(COORDINATE).IsModeA2A">COORDINATE:IsModeA2A()</a></td>
<td class="summary">
<p>Is the mode to A2A</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(COORDINATE).IsModeA2G">COORDINATE:IsModeA2G()</a></td>
<td class="summary">
<p>Is the mode to A2G</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(COORDINATE).Mode">COORDINATE.Mode</a></td>
<td class="summary">
</td>
</tr>
<tr>
@ -385,18 +367,6 @@
<td class="name" nowrap="nowrap"><a href="##(COORDINATE).SetHeading">COORDINATE:SetHeading(Heading)</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(COORDINATE).SetModeA2A">COORDINATE:SetModeA2A()</a></td>
<td class="summary">
<p>Set the mode to A2A</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(COORDINATE).SetModeA2G">COORDINATE:SetModeA2G()</a></td>
<td class="summary">
<p>Set the mode to A2G</p>
</td>
</tr>
<tr>
@ -1698,56 +1668,6 @@ The Vec3 format coordinate.</p>
<p><em>#boolean:</em>
true If the ToCoordinate has LOS with the Coordinate, otherwise false.</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(COORDINATE).IsModeA2A" >
<strong>COORDINATE:IsModeA2A()</strong>
</a>
</dt>
<dd>
<p>Is the mode to A2A</p>
<h3>Return value</h3>
<p><em>#boolean:</em></p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(COORDINATE).IsModeA2G" >
<strong>COORDINATE:IsModeA2G()</strong>
</a>
</dt>
<dd>
<p>Is the mode to A2G</p>
<h3>Return value</h3>
<p><em>#boolean:</em></p>
</dd>
</dl>
<dl class="function">
<dt>
<em>#string</em>
<a id="#(COORDINATE).Mode" >
<strong>COORDINATE.Mode</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
@ -1957,42 +1877,6 @@ The route point.</p>
<dl class="function">
<dt>
<a id="#(COORDINATE).SetModeA2A" >
<strong>COORDINATE:SetModeA2A()</strong>
</a>
</dt>
<dd>
<p>Set the mode to A2A</p>
<h3>Return value</h3>
<p><em><a href="##(COORDINATE)">#COORDINATE</a>:</em></p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(COORDINATE).SetModeA2G" >
<strong>COORDINATE:SetModeA2G()</strong>
</a>
</dt>
<dd>
<p>Set the mode to A2G</p>
<h3>Return value</h3>
<p><em><a href="##(COORDINATE)">#COORDINATE</a>:</em></p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(COORDINATE).Smoke" >
<strong>COORDINATE:Smoke(SmokeColor)</strong>
</a>
@ -2883,6 +2767,7 @@ The y coordinate.</p>
<dl class="function">
<dt>
<em></em>
<a id="#(POINT_VEC2).z" >
<strong>POINT_VEC2.z</strong>
</a>

View File

@ -235,7 +235,7 @@ This uses the very generic singleton function "trigger.action.radioTransmission(
<tr>
<td class="name" nowrap="nowrap"><a href="##(RADIO).Loop">RADIO.Loop</a></td>
<td class="summary">
<p>(default true)</p>
</td>
</tr>
<tr>
@ -781,7 +781,7 @@ self</p>
</dt>
<dd>
<p>(default true)</p>
</dd>
</dl>

View File

@ -2549,6 +2549,9 @@ when nothing was spawned.</p>
<p> By default, no InitLimit</p>
</dd>
</dl>
<dl class="function">
@ -2584,7 +2587,7 @@ when nothing was spawned.</p>
<dl class="function">
<dt>
<em></em>
<em>#number</em>
<a id="#(SPAWN).SpawnMaxGroups" >
<strong>SPAWN.SpawnMaxGroups</strong>
</a>
@ -2601,7 +2604,7 @@ when nothing was spawned.</p>
<dl class="function">
<dt>
<em></em>
<em>#number</em>
<a id="#(SPAWN).SpawnMaxUnitsAlive" >
<strong>SPAWN.SpawnMaxUnitsAlive</strong>
</a>
@ -2929,7 +2932,7 @@ Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):Schedule( 600, 0.5 )
<dl class="function">
<dt>
<em></em>
<em>#boolean</em>
<a id="#(SPAWN).SpawnUnControlled" >
<strong>SPAWN.SpawnUnControlled</strong>
</a>

View File

@ -766,6 +766,7 @@ true if it is lasing</p>
<dl class="function">
<dt>
<em></em>
<a id="#(SPOT).ScheduleID" >
<strong>SPOT.ScheduleID</strong>
</a>
@ -779,6 +780,7 @@ true if it is lasing</p>
<dl class="function">
<dt>
<em></em>
<a id="#(SPOT).SpotIR" >
<strong>SPOT.SpotIR</strong>
</a>
@ -792,6 +794,7 @@ true if it is lasing</p>
<dl class="function">
<dt>
<em></em>
<a id="#(SPOT).SpotLaser" >
<strong>SPOT.SpotLaser</strong>
</a>
@ -805,6 +808,7 @@ true if it is lasing</p>
<dl class="function">
<dt>
<em></em>
<a id="#(SPOT).Target" >
<strong>SPOT.Target</strong>
</a>

View File

@ -215,6 +215,12 @@ and various dedicated deployment zones.</p>
<td class="name" nowrap="nowrap"><a href="##(TASK_CARGO).GetPlannedMenuText">TASK_CARGO:GetPlannedMenuText()</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(TASK_CARGO).GetSmokeColor">TASK_CARGO:GetSmokeColor()</a></td>
<td class="summary">
</td>
</tr>
<tr>
@ -275,6 +281,18 @@ and various dedicated deployment zones.</p>
<td class="name" nowrap="nowrap"><a href="##(TASK_CARGO).SetScoreOnSuccess">TASK_CARGO:SetScoreOnSuccess(Text, Score, TaskUnit)</a></td>
<td class="summary">
<p>Set a score when all the targets in scope of the A2G attack, have been destroyed.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(TASK_CARGO).SetSmokeColor">TASK_CARGO.SetSmokeColor(Color, self, SmokeColor)</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(TASK_CARGO).SmokeColor">TASK_CARGO.SmokeColor</a></td>
<td class="summary">
</td>
</tr>
<tr>
@ -506,7 +524,7 @@ based on the tasking capabilities defined in <a href="Task.html##(TASK)">Task#TA
<dl class="function">
<dt>
<em><a href="Core.Cargo.html##(CARGO_GROUP)">Core.Cargo#CARGO_GROUP</a></em>
<em></em>
<a id="#(FSM_PROCESS).Cargo" >
<strong>FSM_PROCESS.Cargo</strong>
</a>
@ -629,6 +647,22 @@ Core.Zone#ZONE_BASE> The Deployment Zones.</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(TASK_CARGO).GetSmokeColor" >
<strong>TASK_CARGO:GetSmokeColor()</strong>
</a>
</dt>
<dd>
<p>@return SmokeColor</p>
</dd>
</dl>
<dl class="function">
@ -970,6 +1004,52 @@ The score in points.</p>
<p><em><a href="##(TASK_CARGO)">#TASK_CARGO</a>:</em></p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(TASK_CARGO).SetSmokeColor" >
<strong>TASK_CARGO.SetSmokeColor(Color, self, SmokeColor)</strong>
</a>
</dt>
<dd>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em> Color </em></code>:
Might be SMOKECOLOR.Blue, SMOKECOLOR.Red SMOKECOLOR.Orange, SMOKECOLOR.White or SMOKECOLOR.Green</p>
</li>
<li>
<p><code><em> self </em></code>: </p>
</li>
<li>
<p><code><em> SmokeColor </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<em></em>
<a id="#(TASK_CARGO).SmokeColor" >
<strong>TASK_CARGO.SmokeColor</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">