diff --git a/Moose Development/Moose/AI/AI_CAP.lua b/Moose Development/Moose/AI/AI_CAP.lua index c8f7186f9..f1d26a89a 100644 --- a/Moose Development/Moose/AI/AI_CAP.lua +++ b/Moose Development/Moose/AI/AI_CAP.lua @@ -12,7 +12,7 @@ -- --  -- --- The AI_CAP_ZONE is assigned a @(Group) and this must be done before the AI_CAP_ZONE process can be started using the **Start** event. +-- The AI_CAP_ZONE is assigned a @{Group} and this must be done before the AI_CAP_ZONE process can be started using the **Start** event. -- --  -- @@ -103,7 +103,9 @@ -- * **[Quax](https://forums.eagle.ru/member.php?u=90530)**: Concept, Advice & Testing. -- * **[Pikey](https://forums.eagle.ru/member.php?u=62835)**: Concept, Advice & Testing. -- * **[Gunterlund](http://forums.eagle.ru:8080/member.php?u=75036)**: Test case revision. --- +-- * **[Whisper](http://forums.eagle.ru/member.php?u=3829): Testing. +-- * **[Delta99](https://forums.eagle.ru/member.php?u=125166): Testing. +-- -- ### Authors: -- -- * **FlightControl**: Concept, Design & Programming. @@ -336,23 +338,9 @@ end -- @param #string To The To State string. function AI_CAP_ZONE:onafterStart( Controllable, From, Event, To ) + -- Call the parent Start event handler + self:GetParent(self).onafterStart( self, Controllable, From, Event, To ) - self:Route() - self:__Status( 30 ) -- Check status status every 30 seconds. - self:__Detect( self.DetectInterval ) -- Detect for new targets every DetectInterval in the EngageZone. - - self:EventOnDead( self.OnDead ) - - Controllable:OptionROEOpenFire() - - self.Controllable:OnReSpawn( - function( PatrolGroup ) - self:E( "ReSpawn" ) - self:__Reset() - self:__Route( 5 ) - end - ) - end --- @param Wrapper.Controllable#CONTROLLABLE AIControllable @@ -414,8 +402,6 @@ function AI_CAP_ZONE:onafterEngage( Controllable, From, Event, To ) if Controllable:IsAlive() then - self:Detect( self.EngageZone ) - local EngageRoute = {} --- Calculate the current route point. @@ -466,7 +452,7 @@ function AI_CAP_ZONE:onafterEngage( Controllable, From, Event, To ) for DetectedUnitID, DetectedUnit in pairs( self.DetectedUnits ) do local DetectedUnit = DetectedUnit -- Wrapper.Unit#UNIT - self:T( DetectedUnit ) + self:T( { DetectedUnit, DetectedUnit:IsAlive(), DetectedUnit:IsAir() } ) if DetectedUnit:IsAlive() and DetectedUnit:IsAir() then if self.EngageZone then if DetectedUnit:IsInZone( self.EngageZone ) then @@ -494,8 +480,9 @@ function AI_CAP_ZONE:onafterEngage( Controllable, From, Event, To ) if #AttackTasks == 0 then self:E("No targets found -> Going back to Patrolling") - self:Accomplish() - self:Route() + self:__Accomplish( 1 ) + self:__Route( 1 ) + self:SetDetectionActivated() else EngageRoute[1].task = Controllable:TaskCombo( AttackTasks ) @@ -503,10 +490,11 @@ function AI_CAP_ZONE:onafterEngage( Controllable, From, Event, To ) self.Controllable:SetState( self.Controllable, "EngageZone", self ) self.Controllable:WayPointFunction( #EngageRoute, 1, "_NewEngageCapRoute" ) - + + self:SetDetectionDeactivated() end - --- NOW ROUTE THE GROUP! + --- NOW ROUTE THE GROUP! self.Controllable:WayPointExecute( 1, 2 ) end @@ -534,17 +522,7 @@ end -- @param #string To The To State string. function AI_CAP_ZONE:onafterAccomplish( Controllable, From, Event, To ) self.Accomplished = true - self.DetectUnits = false -end - ---- @param #AI_CAP_ZONE self --- @param Core.Event#EVENTDATA EventData -function AI_CAP_ZONE:OnDead( EventData ) - self:T( { "EventDead", EventData } ) - - if EventData.IniDCSUnit then - self:__Destroy( 1, EventData ) - end + self:SetDetectionOff() end diff --git a/Moose Development/Moose/AI/AI_CAS.lua b/Moose Development/Moose/AI/AI_CAS.lua index ac60b1ea5..6e2116cf6 100644 --- a/Moose Development/Moose/AI/AI_CAS.lua +++ b/Moose Development/Moose/AI/AI_CAS.lua @@ -14,7 +14,7 @@ -- --  -- --- The AI_CAS_ZONE is assigned a @(Group) and this must be done before the AI_CAS_ZONE process can be started through the **Start** event. +-- The AI_CAS_ZONE is assigned a @{Group} and this must be done before the AI_CAS_ZONE process can be started through the **Start** event. -- --  -- @@ -122,7 +122,7 @@ -- @type AI_CAS_ZONE -- @field Wrapper.Controllable#CONTROLLABLE AIControllable The @{Controllable} patrolling. -- @field Core.Zone#ZONE_BASE TargetZone The @{Zone} where the patrol needs to be executed. --- @extends AI.AI_Patrol#AI_CAS_ZONE +-- @extends AI.AI_Patrol#AI_PATROL_ZONE AI_CAS_ZONE = { ClassName = "AI_CAS_ZONE", } @@ -334,24 +334,10 @@ end -- @param #string To The To State string. function AI_CAS_ZONE:onafterStart( Controllable, From, Event, To ) - - self:Route() - self:__Status( 30 ) -- Check status status every 30 seconds. - self:__Detect( self.DetectInterval ) -- Detect for new targets every DetectInterval in the EngageZone. - + -- Call the parent Start event handler + self:GetParent(self).onafterStart( self, Controllable, From, Event, To ) self:EventOnDead( self.OnDead ) - Controllable:OptionROEHoldFire() - Controllable:OptionROTVertical() - - self.Controllable:OnReSpawn( - function( PatrolGroup ) - self:E( "ReSpawn" ) - self:__Reset() - self:__Route( 5 ) - end - ) - end --- @param Wrapper.Controllable#CONTROLLABLE AIControllable @@ -384,8 +370,6 @@ function AI_CAS_ZONE:onafterEngage( Controllable, From, Event, To ) if Controllable:IsAlive() then - self:Detect( self.EngageZone ) - local EngageRoute = {} --- Calculate the current route point. @@ -516,7 +500,7 @@ end -- @param #string To The To State string. function AI_CAS_ZONE:onafterAccomplish( Controllable, From, Event, To ) self.Accomplished = true - self.DetectUnits = false + self:SetDetectionOff() end --- @param #AI_CAS_ZONE self diff --git a/Moose Development/Moose/AI/AI_Patrol.lua b/Moose Development/Moose/AI/AI_Patrol.lua index 9edc140a8..c1a761c38 100644 --- a/Moose Development/Moose/AI/AI_Patrol.lua +++ b/Moose Development/Moose/AI/AI_Patrol.lua @@ -11,7 +11,7 @@ -- --  -- --- The AI_PATROL_ZONE is assigned a @(Group) and this must be done before the AI_PATROL_ZONE process can be started using the **Start** event. +-- The AI_PATROL_ZONE is assigned a @{Group} and this must be done before the AI_PATROL_ZONE process can be started using the **Start** event. -- --  -- @@ -402,6 +402,10 @@ function AI_PATROL_ZONE:New( PatrolZone, PatrolFloorAltitude, PatrolCeilingAltit self:AddTransition( "*", "Reset", "Patrolling" ) -- FSM_CONTROLLABLE Transition for type #AI_PATROL_ZONE. + self:AddTransition( "*", "Eject", "Ejected" ) + self:AddTransition( "*", "Crash", "Crashed" ) + self:AddTransition( "*", "PilotDead", "PilotDead" ) + return self end @@ -443,7 +447,7 @@ end function AI_PATROL_ZONE:SetDetectionOn() self:F2() - self.DetectUnits = true + self.DetectOn = true end --- Set the detection off. The AI will NOT detect for targets. @@ -453,7 +457,35 @@ end function AI_PATROL_ZONE:SetDetectionOff() self:F2() - self.DetectUnits = false + self.DetectOn = false +end + +--- Set the status checking off. +-- @param #AI_PATROL_ZONE self +-- @return #AI_PATROL_ZONE self +function AI_PATROL_ZONE:SetStatusOff() + self:F2() + + self.CheckStatus = false +end + +--- Activate the detection. The AI will detect for targets if the Detection is switched On. +-- @param #AI_PATROL_ZONE self +-- @return #AI_PATROL_ZONE self +function AI_PATROL_ZONE:SetDetectionActivated() + self:F2() + + self.DetectActivated = true + self:__Detect( self.DetectInterval ) +end + +--- Deactivate the detection. The AI will NOT detect for targets. +-- @param #AI_PATROL_ZONE self +-- @return #AI_PATROL_ZONE self +function AI_PATROL_ZONE:SetDetectionDeactivated() + self:F2() + + self.DetectActivated = false end --- Set the interval in seconds between each detection executed by the AI. @@ -496,7 +528,7 @@ end function AI_PATROL_ZONE:GetDetectedUnits() self:F2() - return self.DetectedUnits + return self.DetectedUnits end @@ -544,13 +576,18 @@ end function AI_PATROL_ZONE:onafterStart( Controllable, From, Event, To ) self:F2() - self:__Route( 5 ) -- Route to the patrol point. The asynchronous trigger is important, because a spawned group and units takes at least one second to come live. - self:__Status( 30 ) -- Check status status every 30 seconds. - self:__Detect( self.DetectInterval ) -- Detect for new targets every 30 seconds. + self:__Route( 1 ) -- Route to the patrol point. The asynchronous trigger is important, because a spawned group and units takes at least one second to come live. + self:__Status( 60 ) -- Check status status every 30 seconds. + self:SetDetectionActivated() + + self:EventOnPilotDead( self.OnPilotDead ) + self:EventOnCrash( self.OnCrash ) + self:EventOnEjection( self.OnEjection ) + Controllable:OptionROEHoldFire() Controllable:OptionROTVertical() - + self.Controllable:OnReSpawn( function( PatrolGroup ) self:E( "ReSpawn" ) @@ -566,7 +603,7 @@ end --- @param Wrapper.Controllable#CONTROLLABLE Controllable function AI_PATROL_ZONE:onbeforeDetect( Controllable, From, Event, To ) - return self.DetectUnits + return self.DetectOn and self.DetectActivated end --- @param #AI_PATROL_ZONE self @@ -597,11 +634,12 @@ function AI_PATROL_ZONE:onafterDetect( Controllable, From, Event, To ) end end + self:__Detect( self.DetectInterval ) + if Detected == true then - self:__Detected( 1 ) + self:__Detected( 1.5 ) end - self:__Detect( self.DetectInterval ) end --- @param Wrapper.Controllable#CONTROLLABLE AIControllable @@ -757,7 +795,7 @@ function AI_PATROL_ZONE:onafterStatus() if RTB == true then self:RTB() else - self:__Status( 30 ) -- Execute the Patrol event after 30 seconds. + self:__Status( 60 ) -- Execute the Patrol event after 30 seconds. end end end @@ -799,3 +837,37 @@ function AI_PATROL_ZONE:onafterRTB() end end + +--- @param #AI_PATROL_ZONE self +function AI_PATROL_ZONE:onafterDead() + self:SetDetectionOff() + self:SetStatusOff() +end + +--- @param #AI_PATROL_ZONE self +-- @param Core.Event#EVENTDATA EventData +function AI_PATROL_ZONE:OnCrash( EventData ) + + if self.Controllable:IsAlive() and EventData.IniDCSGroupName == self.Controllable:GetName() then + self:__Crash( 1, EventData ) + end +end + +--- @param #AI_PATROL_ZONE self +-- @param Core.Event#EVENTDATA EventData +function AI_PATROL_ZONE:OnEjection( EventData ) + + if self.Controllable:IsAlive() and EventData.IniDCSGroupName == self.Controllable:GetName() then + self:__Eject( 1, EventData ) + end +end + +--- @param #AI_PATROL_ZONE self +-- @param Core.Event#EVENTDATA EventData +function AI_PATROL_ZONE:OnPilotDead( EventData ) + + if self.Controllable:IsAlive() and EventData.IniDCSGroupName == self.Controllable:GetName() then + self:__PilotDead( 1, EventData ) + end +end + diff --git a/Moose Development/Moose/Core/Event.lua b/Moose Development/Moose/Core/Event.lua index e3f5301a2..cedee92e6 100644 --- a/Moose Development/Moose/Core/Event.lua +++ b/Moose Development/Moose/Core/Event.lua @@ -717,6 +717,16 @@ end -- @param #EVENTDATA Event function EVENT:onEvent( Event ) + local ErrorHandler = function( errmsg ) + + env.info( "Error in SCHEDULER function:" .. errmsg ) + if debug ~= nil then + env.info( debug.traceback() ) + end + + return errmsg + end + if self and self.Events and self.Events[Event.id] then if Event.initiator and Event.initiator:getCategory() == Object.Category.UNIT then Event.IniDCSUnit = Event.initiator @@ -758,14 +768,16 @@ function EVENT:onEvent( Event ) -- If the EventData is for a UNIT, the call directly the EventClass EventFunction for that UNIT. if Event.IniDCSUnitName and EventData.IniUnit and EventData.IniUnit[Event.IniDCSUnitName] then self:T( { "Calling EventFunction for Class ", EventClass:GetClassNameAndID(), ", Unit ", Event.IniUnitName } ) - EventData.IniUnit[Event.IniDCSUnitName].EventFunction( EventData.IniUnit[Event.IniDCSUnitName].EventClass, Event ) + local Result, Value = xpcall( function() return EventData.IniUnit[Event.IniDCSUnitName].EventFunction( EventData.IniUnit[Event.IniDCSUnitName].EventClass, Event ) end, ErrorHandler ) + --EventData.IniUnit[Event.IniDCSUnitName].EventFunction( EventData.IniUnit[Event.IniDCSUnitName].EventClass, Event ) else -- If the EventData is not bound to a specific unit, then call the EventClass EventFunction. -- Note that here the EventFunction will need to implement and determine the logic for the relevant source- or target unit, or weapon. if Event.IniDCSUnit and not EventData.IniUnit then if EventClass == EventData.EventClass then self:T( { "Calling EventFunction for Class ", EventClass:GetClassNameAndID() } ) - EventData.EventFunction( EventData.EventClass, Event ) + local Result, Value = xpcall( function() return EventData.EventFunction( EventData.EventClass, Event ) end, ErrorHandler ) + --EventData.EventFunction( EventData.EventClass, Event ) end end end diff --git a/Moose Development/Moose/Core/Fsm.lua b/Moose Development/Moose/Core/Fsm.lua index 382ca1cad..67e338158 100644 --- a/Moose Development/Moose/Core/Fsm.lua +++ b/Moose Development/Moose/Core/Fsm.lua @@ -529,7 +529,8 @@ do -- FSM function FSM:_call_handler(handler, params) if self[handler] then self:E( "Calling " .. handler ) - return self[handler]( self, unpack(params) ) + local Value = self[handler]( self, unpack(params) ) + return Value end end @@ -551,10 +552,11 @@ do -- FSM self:E( "FSM Transition:" .. self.current .. " --> " .. EventName .. " --> " .. to ) end - if self:_call_handler("onbefore" .. EventName, params) == false - or self:_call_handler("OnBefore" .. EventName, params) == false - or self:_call_handler("onleave" .. from, params) == false - or self:_call_handler("OnLeave" .. from, params) == false then + if ( self:_call_handler("onbefore" .. EventName, params) == false ) + or ( self:_call_handler("OnBefore" .. EventName, params) == false ) + or ( self:_call_handler("onleave" .. from, params) == false ) + or ( self:_call_handler("OnLeave" .. from, params) == false ) then + self:E( "Cancel Transition" ) return false end @@ -746,7 +748,8 @@ do -- FSM_CONTROLLABLE if self[handler] then self:F3( "Calling " .. handler ) - return xpcall( function() return self[handler]( self, self.Controllable, unpack( params ) ) end, ErrorHandler ) + local Result, Value = xpcall( function() return self[handler]( self, self.Controllable, unpack( params ) ) end, ErrorHandler ) + return Value --return self[handler]( self, self.Controllable, unpack( params ) ) end end diff --git a/Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua b/Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua index e02bdb889..764affad3 100644 --- a/Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua +++ b/Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua @@ -1,5 +1,5 @@ env.info( '*** MOOSE STATIC INCLUDE START *** ' ) -env.info( 'Moose Generation Timestamp: 20170117_1202' ) +env.info( 'Moose Generation Timestamp: 20170119_1944' ) local base = _G Include = {} @@ -4878,6 +4878,16 @@ end -- @param #EVENTDATA Event function EVENT:onEvent( Event ) + local ErrorHandler = function( errmsg ) + + env.info( "Error in SCHEDULER function:" .. errmsg ) + if debug ~= nil then + env.info( debug.traceback() ) + end + + return errmsg + end + if self and self.Events and self.Events[Event.id] then if Event.initiator and Event.initiator:getCategory() == Object.Category.UNIT then Event.IniDCSUnit = Event.initiator @@ -4919,14 +4929,16 @@ function EVENT:onEvent( Event ) -- If the EventData is for a UNIT, the call directly the EventClass EventFunction for that UNIT. if Event.IniDCSUnitName and EventData.IniUnit and EventData.IniUnit[Event.IniDCSUnitName] then self:T( { "Calling EventFunction for Class ", EventClass:GetClassNameAndID(), ", Unit ", Event.IniUnitName } ) - EventData.IniUnit[Event.IniDCSUnitName].EventFunction( EventData.IniUnit[Event.IniDCSUnitName].EventClass, Event ) + local Result, Value = xpcall( function() return EventData.IniUnit[Event.IniDCSUnitName].EventFunction( EventData.IniUnit[Event.IniDCSUnitName].EventClass, Event ) end, ErrorHandler ) + --EventData.IniUnit[Event.IniDCSUnitName].EventFunction( EventData.IniUnit[Event.IniDCSUnitName].EventClass, Event ) else -- If the EventData is not bound to a specific unit, then call the EventClass EventFunction. -- Note that here the EventFunction will need to implement and determine the logic for the relevant source- or target unit, or weapon. if Event.IniDCSUnit and not EventData.IniUnit then if EventClass == EventData.EventClass then self:T( { "Calling EventFunction for Class ", EventClass:GetClassNameAndID() } ) - EventData.EventFunction( EventData.EventClass, Event ) + local Result, Value = xpcall( function() return EventData.EventFunction( EventData.EventClass, Event ) end, ErrorHandler ) + --EventData.EventFunction( EventData.EventClass, Event ) end end end @@ -11243,7 +11255,8 @@ do -- FSM function FSM:_call_handler(handler, params) if self[handler] then self:E( "Calling " .. handler ) - return self[handler]( self, unpack(params) ) + local Value = self[handler]( self, unpack(params) ) + return Value end end @@ -11265,10 +11278,11 @@ do -- FSM self:E( "FSM Transition:" .. self.current .. " --> " .. EventName .. " --> " .. to ) end - if self:_call_handler("onbefore" .. EventName, params) == false - or self:_call_handler("OnBefore" .. EventName, params) == false - or self:_call_handler("onleave" .. from, params) == false - or self:_call_handler("OnLeave" .. from, params) == false then + if ( self:_call_handler("onbefore" .. EventName, params) == false ) + or ( self:_call_handler("OnBefore" .. EventName, params) == false ) + or ( self:_call_handler("onleave" .. from, params) == false ) + or ( self:_call_handler("OnLeave" .. from, params) == false ) then + self:E( "Cancel Transition" ) return false end @@ -11460,7 +11474,8 @@ do -- FSM_CONTROLLABLE if self[handler] then self:F3( "Calling " .. handler ) - return xpcall( function() return self[handler]( self, self.Controllable, unpack( params ) ) end, ErrorHandler ) + local Result, Value = xpcall( function() return self[handler]( self, self.Controllable, unpack( params ) ) end, ErrorHandler ) + return Value --return self[handler]( self, self.Controllable, unpack( params ) ) end end @@ -12549,7 +12564,7 @@ end -- * @{#CONTROLLABLE.TaskEmbarkToTransport}: (GROUND) Embark to a Transport landed at a location. -- * @{#CONTROLLABLE.TaskEscort}: (AIR) Escort another airborne controllable. -- * @{#CONTROLLABLE.TaskFAC_AttackControllable}: (AIR + GROUND) The task makes the controllable/unit a FAC and orders the FAC to control the target (enemy ground controllable) destruction. --- * @{#CONTROLLABLE.TaskFireAtPoint}: (GROUND) Fire at a VEC2 point until ammunition is finished. +-- * @{#CONTROLLABLE.TaskFireAtPoint}: (GROUND) Fire some or all ammunition at a VEC2 point. -- * @{#CONTROLLABLE.TaskFollow}: (AIR) Following another airborne controllable. -- * @{#CONTROLLABLE.TaskHold}: (GROUND) Hold ground controllable from moving. -- * @{#CONTROLLABLE.TaskHoldPosition}: (AIR) Hold position at the current position of the first unit of the controllable. @@ -13457,15 +13472,18 @@ end -- @param #CONTROLLABLE self -- @param Dcs.DCSTypes#Vec2 Vec2 The point to fire at. -- @param Dcs.DCSTypes#Distance Radius The radius of the zone to deploy the fire at. +-- @param #number AmmoCount (optional) Quantity of ammunition to expand (omit to fire until ammunition is depleted). -- @return Dcs.DCSTasking.Task#Task The DCS task structure. -function CONTROLLABLE:TaskFireAtPoint( Vec2, Radius ) - self:F2( { self.ControllableName, Vec2, Radius } ) +function CONTROLLABLE:TaskFireAtPoint( Vec2, Radius, AmmoCount ) + self:F2( { self.ControllableName, Vec2, Radius, AmmoCount } ) -- FireAtPoint = { -- id = 'FireAtPoint', -- params = { -- point = Vec2, -- radius = Distance, + -- expendQty = number, + -- expendQtyEnabled = boolean, -- } -- } @@ -13474,8 +13492,15 @@ function CONTROLLABLE:TaskFireAtPoint( Vec2, Radius ) params = { point = Vec2, radius = Radius, + expendQty = 100, -- dummy value + expendQtyEnabled = false, } } + + if AmmoCount then + DCSTask.params.expendQty = AmmoCount + DCSTask.params.expendQtyEnabled = true + end self:T3( { DCSTask } ) return DCSTask @@ -24669,7 +24694,7 @@ end -- --  -- --- The AI_PATROL_ZONE is assigned a @(Group) and this must be done before the AI_PATROL_ZONE process can be started using the **Start** event. +-- The AI_PATROL_ZONE is assigned a @{Group} and this must be done before the AI_PATROL_ZONE process can be started using the **Start** event. -- --  -- @@ -25060,6 +25085,10 @@ function AI_PATROL_ZONE:New( PatrolZone, PatrolFloorAltitude, PatrolCeilingAltit self:AddTransition( "*", "Reset", "Patrolling" ) -- FSM_CONTROLLABLE Transition for type #AI_PATROL_ZONE. + self:AddTransition( "*", "Eject", "Ejected" ) + self:AddTransition( "*", "Crash", "Crashed" ) + self:AddTransition( "*", "PilotDead", "PilotDead" ) + return self end @@ -25101,7 +25130,7 @@ end function AI_PATROL_ZONE:SetDetectionOn() self:F2() - self.DetectUnits = true + self.DetectOn = true end --- Set the detection off. The AI will NOT detect for targets. @@ -25111,7 +25140,35 @@ end function AI_PATROL_ZONE:SetDetectionOff() self:F2() - self.DetectUnits = false + self.DetectOn = false +end + +--- Set the status checking off. +-- @param #AI_PATROL_ZONE self +-- @return #AI_PATROL_ZONE self +function AI_PATROL_ZONE:SetStatusOff() + self:F2() + + self.CheckStatus = false +end + +--- Activate the detection. The AI will detect for targets if the Detection is switched On. +-- @param #AI_PATROL_ZONE self +-- @return #AI_PATROL_ZONE self +function AI_PATROL_ZONE:SetDetectionActivated() + self:F2() + + self.DetectActivated = true + self:__Detect( self.DetectInterval ) +end + +--- Deactivate the detection. The AI will NOT detect for targets. +-- @param #AI_PATROL_ZONE self +-- @return #AI_PATROL_ZONE self +function AI_PATROL_ZONE:SetDetectionDeactivated() + self:F2() + + self.DetectActivated = false end --- Set the interval in seconds between each detection executed by the AI. @@ -25154,7 +25211,7 @@ end function AI_PATROL_ZONE:GetDetectedUnits() self:F2() - return self.DetectedUnits + return self.DetectedUnits end @@ -25202,13 +25259,18 @@ end function AI_PATROL_ZONE:onafterStart( Controllable, From, Event, To ) self:F2() - self:__Route( 5 ) -- Route to the patrol point. The asynchronous trigger is important, because a spawned group and units takes at least one second to come live. - self:__Status( 30 ) -- Check status status every 30 seconds. - self:__Detect( self.DetectInterval ) -- Detect for new targets every 30 seconds. + self:__Route( 1 ) -- Route to the patrol point. The asynchronous trigger is important, because a spawned group and units takes at least one second to come live. + self:__Status( 60 ) -- Check status status every 30 seconds. + self:SetDetectionActivated() + + self:EventOnPilotDead( self.OnPilotDead ) + self:EventOnCrash( self.OnCrash ) + self:EventOnEjection( self.OnEjection ) + Controllable:OptionROEHoldFire() Controllable:OptionROTVertical() - + self.Controllable:OnReSpawn( function( PatrolGroup ) self:E( "ReSpawn" ) @@ -25224,7 +25286,7 @@ end --- @param Wrapper.Controllable#CONTROLLABLE Controllable function AI_PATROL_ZONE:onbeforeDetect( Controllable, From, Event, To ) - return self.DetectUnits + return self.DetectOn and self.DetectActivated end --- @param #AI_PATROL_ZONE self @@ -25255,11 +25317,12 @@ function AI_PATROL_ZONE:onafterDetect( Controllable, From, Event, To ) end end + self:__Detect( self.DetectInterval ) + if Detected == true then - self:__Detected( 1 ) + self:__Detected( 1.5 ) end - self:__Detect( self.DetectInterval ) end --- @param Wrapper.Controllable#CONTROLLABLE AIControllable @@ -25415,7 +25478,7 @@ function AI_PATROL_ZONE:onafterStatus() if RTB == true then self:RTB() else - self:__Status( 30 ) -- Execute the Patrol event after 30 seconds. + self:__Status( 60 ) -- Execute the Patrol event after 30 seconds. end end end @@ -25457,6 +25520,40 @@ function AI_PATROL_ZONE:onafterRTB() end end + +--- @param #AI_PATROL_ZONE self +function AI_PATROL_ZONE:onafterDead() + self:SetDetectionOff() + self:SetStatusOff() +end + +--- @param #AI_PATROL_ZONE self +-- @param Core.Event#EVENTDATA EventData +function AI_PATROL_ZONE:OnCrash( EventData ) + + if self.Controllable:IsAlive() and EventData.IniDCSGroupName == self.Controllable:GetName() then + self:__Crash( 1, EventData ) + end +end + +--- @param #AI_PATROL_ZONE self +-- @param Core.Event#EVENTDATA EventData +function AI_PATROL_ZONE:OnEjection( EventData ) + + if self.Controllable:IsAlive() and EventData.IniDCSGroupName == self.Controllable:GetName() then + self:__Eject( 1, EventData ) + end +end + +--- @param #AI_PATROL_ZONE self +-- @param Core.Event#EVENTDATA EventData +function AI_PATROL_ZONE:OnPilotDead( EventData ) + + if self.Controllable:IsAlive() and EventData.IniDCSGroupName == self.Controllable:GetName() then + self:__PilotDead( 1, EventData ) + end +end + --- Single-Player:**Yes** / Mulit-Player:**Yes** / AI:**Yes** / Human:**No** / Types:**Air** -- **Provide Close Air Support to friendly ground troops.** -- --  @@ -25473,7 +25570,7 @@ end -- --  -- --- The AI_CAS_ZONE is assigned a @(Group) and this must be done before the AI_CAS_ZONE process can be started through the **Start** event. +-- The AI_CAS_ZONE is assigned a @{Group} and this must be done before the AI_CAS_ZONE process can be started through the **Start** event. -- --  -- @@ -25581,7 +25678,7 @@ end -- @type AI_CAS_ZONE -- @field Wrapper.Controllable#CONTROLLABLE AIControllable The @{Controllable} patrolling. -- @field Core.Zone#ZONE_BASE TargetZone The @{Zone} where the patrol needs to be executed. --- @extends AI.AI_Patrol#AI_CAS_ZONE +-- @extends AI.AI_Patrol#AI_PATROL_ZONE AI_CAS_ZONE = { ClassName = "AI_CAS_ZONE", } @@ -25793,24 +25890,10 @@ end -- @param #string To The To State string. function AI_CAS_ZONE:onafterStart( Controllable, From, Event, To ) - - self:Route() - self:__Status( 30 ) -- Check status status every 30 seconds. - self:__Detect( self.DetectInterval ) -- Detect for new targets every DetectInterval in the EngageZone. - + -- Call the parent Start event handler + self:GetParent(self).onafterStart( self, Controllable, From, Event, To ) self:EventOnDead( self.OnDead ) - Controllable:OptionROEHoldFire() - Controllable:OptionROTVertical() - - self.Controllable:OnReSpawn( - function( PatrolGroup ) - self:E( "ReSpawn" ) - self:__Reset() - self:__Route( 5 ) - end - ) - end --- @param Wrapper.Controllable#CONTROLLABLE AIControllable @@ -25843,8 +25926,6 @@ function AI_CAS_ZONE:onafterEngage( Controllable, From, Event, To ) if Controllable:IsAlive() then - self:Detect( self.EngageZone ) - local EngageRoute = {} --- Calculate the current route point. @@ -25975,7 +26056,7 @@ end -- @param #string To The To State string. function AI_CAS_ZONE:onafterAccomplish( Controllable, From, Event, To ) self.Accomplished = true - self.DetectUnits = false + self:SetDetectionOff() end --- @param #AI_CAS_ZONE self @@ -26003,7 +26084,7 @@ end -- --  -- --- The AI_CAP_ZONE is assigned a @(Group) and this must be done before the AI_CAP_ZONE process can be started using the **Start** event. +-- The AI_CAP_ZONE is assigned a @{Group} and this must be done before the AI_CAP_ZONE process can be started using the **Start** event. -- --  -- @@ -26094,7 +26175,9 @@ end -- * **[Quax](https://forums.eagle.ru/member.php?u=90530)**: Concept, Advice & Testing. -- * **[Pikey](https://forums.eagle.ru/member.php?u=62835)**: Concept, Advice & Testing. -- * **[Gunterlund](http://forums.eagle.ru:8080/member.php?u=75036)**: Test case revision. --- +-- * **[Whisper](http://forums.eagle.ru/member.php?u=3829): Testing. +-- * **[Delta99](https://forums.eagle.ru/member.php?u=125166): Testing. +-- -- ### Authors: -- -- * **FlightControl**: Concept, Design & Programming. @@ -26327,23 +26410,9 @@ end -- @param #string To The To State string. function AI_CAP_ZONE:onafterStart( Controllable, From, Event, To ) + -- Call the parent Start event handler + self:GetParent(self).onafterStart( self, Controllable, From, Event, To ) - self:Route() - self:__Status( 30 ) -- Check status status every 30 seconds. - self:__Detect( self.DetectInterval ) -- Detect for new targets every DetectInterval in the EngageZone. - - self:EventOnDead( self.OnDead ) - - Controllable:OptionROEOpenFire() - - self.Controllable:OnReSpawn( - function( PatrolGroup ) - self:E( "ReSpawn" ) - self:__Reset() - self:__Route( 5 ) - end - ) - end --- @param Wrapper.Controllable#CONTROLLABLE AIControllable @@ -26405,8 +26474,6 @@ function AI_CAP_ZONE:onafterEngage( Controllable, From, Event, To ) if Controllable:IsAlive() then - self:Detect( self.EngageZone ) - local EngageRoute = {} --- Calculate the current route point. @@ -26457,7 +26524,7 @@ function AI_CAP_ZONE:onafterEngage( Controllable, From, Event, To ) for DetectedUnitID, DetectedUnit in pairs( self.DetectedUnits ) do local DetectedUnit = DetectedUnit -- Wrapper.Unit#UNIT - self:T( DetectedUnit ) + self:T( { DetectedUnit, DetectedUnit:IsAlive(), DetectedUnit:IsAir() } ) if DetectedUnit:IsAlive() and DetectedUnit:IsAir() then if self.EngageZone then if DetectedUnit:IsInZone( self.EngageZone ) then @@ -26485,8 +26552,9 @@ function AI_CAP_ZONE:onafterEngage( Controllable, From, Event, To ) if #AttackTasks == 0 then self:E("No targets found -> Going back to Patrolling") - self:Accomplish() - self:Route() + self:__Accomplish( 1 ) + self:__Route( 1 ) + self:SetDetectionActivated() else EngageRoute[1].task = Controllable:TaskCombo( AttackTasks ) @@ -26494,10 +26562,11 @@ function AI_CAP_ZONE:onafterEngage( Controllable, From, Event, To ) self.Controllable:SetState( self.Controllable, "EngageZone", self ) self.Controllable:WayPointFunction( #EngageRoute, 1, "_NewEngageCapRoute" ) - + + self:SetDetectionDeactivated() end - --- NOW ROUTE THE GROUP! + --- NOW ROUTE THE GROUP! self.Controllable:WayPointExecute( 1, 2 ) end @@ -26525,17 +26594,7 @@ end -- @param #string To The To State string. function AI_CAP_ZONE:onafterAccomplish( Controllable, From, Event, To ) self.Accomplished = true - self.DetectUnits = false -end - ---- @param #AI_CAP_ZONE self --- @param Core.Event#EVENTDATA EventData -function AI_CAP_ZONE:OnDead( EventData ) - self:T( { "EventDead", EventData } ) - - if EventData.IniDCSUnit then - self:__Destroy( 1, EventData ) - end + self:SetDetectionOff() end diff --git a/Moose Mission Setup/Moose.lua b/Moose Mission Setup/Moose.lua index c3a487230..764affad3 100644 --- a/Moose Mission Setup/Moose.lua +++ b/Moose Mission Setup/Moose.lua @@ -1,5 +1,5 @@ env.info( '*** MOOSE STATIC INCLUDE START *** ' ) -env.info( 'Moose Generation Timestamp: 20170117_1202' ) +env.info( 'Moose Generation Timestamp: 20170119_1944' ) local base = _G Include = {} @@ -4878,6 +4878,16 @@ end -- @param #EVENTDATA Event function EVENT:onEvent( Event ) + local ErrorHandler = function( errmsg ) + + env.info( "Error in SCHEDULER function:" .. errmsg ) + if debug ~= nil then + env.info( debug.traceback() ) + end + + return errmsg + end + if self and self.Events and self.Events[Event.id] then if Event.initiator and Event.initiator:getCategory() == Object.Category.UNIT then Event.IniDCSUnit = Event.initiator @@ -4919,14 +4929,16 @@ function EVENT:onEvent( Event ) -- If the EventData is for a UNIT, the call directly the EventClass EventFunction for that UNIT. if Event.IniDCSUnitName and EventData.IniUnit and EventData.IniUnit[Event.IniDCSUnitName] then self:T( { "Calling EventFunction for Class ", EventClass:GetClassNameAndID(), ", Unit ", Event.IniUnitName } ) - EventData.IniUnit[Event.IniDCSUnitName].EventFunction( EventData.IniUnit[Event.IniDCSUnitName].EventClass, Event ) + local Result, Value = xpcall( function() return EventData.IniUnit[Event.IniDCSUnitName].EventFunction( EventData.IniUnit[Event.IniDCSUnitName].EventClass, Event ) end, ErrorHandler ) + --EventData.IniUnit[Event.IniDCSUnitName].EventFunction( EventData.IniUnit[Event.IniDCSUnitName].EventClass, Event ) else -- If the EventData is not bound to a specific unit, then call the EventClass EventFunction. -- Note that here the EventFunction will need to implement and determine the logic for the relevant source- or target unit, or weapon. if Event.IniDCSUnit and not EventData.IniUnit then if EventClass == EventData.EventClass then self:T( { "Calling EventFunction for Class ", EventClass:GetClassNameAndID() } ) - EventData.EventFunction( EventData.EventClass, Event ) + local Result, Value = xpcall( function() return EventData.EventFunction( EventData.EventClass, Event ) end, ErrorHandler ) + --EventData.EventFunction( EventData.EventClass, Event ) end end end @@ -11243,7 +11255,8 @@ do -- FSM function FSM:_call_handler(handler, params) if self[handler] then self:E( "Calling " .. handler ) - return self[handler]( self, unpack(params) ) + local Value = self[handler]( self, unpack(params) ) + return Value end end @@ -11265,10 +11278,11 @@ do -- FSM self:E( "FSM Transition:" .. self.current .. " --> " .. EventName .. " --> " .. to ) end - if self:_call_handler("onbefore" .. EventName, params) == false - or self:_call_handler("OnBefore" .. EventName, params) == false - or self:_call_handler("onleave" .. from, params) == false - or self:_call_handler("OnLeave" .. from, params) == false then + if ( self:_call_handler("onbefore" .. EventName, params) == false ) + or ( self:_call_handler("OnBefore" .. EventName, params) == false ) + or ( self:_call_handler("onleave" .. from, params) == false ) + or ( self:_call_handler("OnLeave" .. from, params) == false ) then + self:E( "Cancel Transition" ) return false end @@ -11460,7 +11474,8 @@ do -- FSM_CONTROLLABLE if self[handler] then self:F3( "Calling " .. handler ) - return xpcall( function() return self[handler]( self, self.Controllable, unpack( params ) ) end, ErrorHandler ) + local Result, Value = xpcall( function() return self[handler]( self, self.Controllable, unpack( params ) ) end, ErrorHandler ) + return Value --return self[handler]( self, self.Controllable, unpack( params ) ) end end @@ -13483,8 +13498,8 @@ function CONTROLLABLE:TaskFireAtPoint( Vec2, Radius, AmmoCount ) } if AmmoCount then - DCSTask.params.expendQty = AmmoCount - DCSTask.params.expendQtyEnabled = true + DCSTask.params.expendQty = AmmoCount + DCSTask.params.expendQtyEnabled = true end self:T3( { DCSTask } ) @@ -24679,7 +24694,7 @@ end -- --  -- --- The AI_PATROL_ZONE is assigned a @(Group) and this must be done before the AI_PATROL_ZONE process can be started using the **Start** event. +-- The AI_PATROL_ZONE is assigned a @{Group} and this must be done before the AI_PATROL_ZONE process can be started using the **Start** event. -- --  -- @@ -25070,6 +25085,10 @@ function AI_PATROL_ZONE:New( PatrolZone, PatrolFloorAltitude, PatrolCeilingAltit self:AddTransition( "*", "Reset", "Patrolling" ) -- FSM_CONTROLLABLE Transition for type #AI_PATROL_ZONE. + self:AddTransition( "*", "Eject", "Ejected" ) + self:AddTransition( "*", "Crash", "Crashed" ) + self:AddTransition( "*", "PilotDead", "PilotDead" ) + return self end @@ -25111,7 +25130,7 @@ end function AI_PATROL_ZONE:SetDetectionOn() self:F2() - self.DetectUnits = true + self.DetectOn = true end --- Set the detection off. The AI will NOT detect for targets. @@ -25121,7 +25140,35 @@ end function AI_PATROL_ZONE:SetDetectionOff() self:F2() - self.DetectUnits = false + self.DetectOn = false +end + +--- Set the status checking off. +-- @param #AI_PATROL_ZONE self +-- @return #AI_PATROL_ZONE self +function AI_PATROL_ZONE:SetStatusOff() + self:F2() + + self.CheckStatus = false +end + +--- Activate the detection. The AI will detect for targets if the Detection is switched On. +-- @param #AI_PATROL_ZONE self +-- @return #AI_PATROL_ZONE self +function AI_PATROL_ZONE:SetDetectionActivated() + self:F2() + + self.DetectActivated = true + self:__Detect( self.DetectInterval ) +end + +--- Deactivate the detection. The AI will NOT detect for targets. +-- @param #AI_PATROL_ZONE self +-- @return #AI_PATROL_ZONE self +function AI_PATROL_ZONE:SetDetectionDeactivated() + self:F2() + + self.DetectActivated = false end --- Set the interval in seconds between each detection executed by the AI. @@ -25164,7 +25211,7 @@ end function AI_PATROL_ZONE:GetDetectedUnits() self:F2() - return self.DetectedUnits + return self.DetectedUnits end @@ -25212,13 +25259,18 @@ end function AI_PATROL_ZONE:onafterStart( Controllable, From, Event, To ) self:F2() - self:__Route( 5 ) -- Route to the patrol point. The asynchronous trigger is important, because a spawned group and units takes at least one second to come live. - self:__Status( 30 ) -- Check status status every 30 seconds. - self:__Detect( self.DetectInterval ) -- Detect for new targets every 30 seconds. + self:__Route( 1 ) -- Route to the patrol point. The asynchronous trigger is important, because a spawned group and units takes at least one second to come live. + self:__Status( 60 ) -- Check status status every 30 seconds. + self:SetDetectionActivated() + + self:EventOnPilotDead( self.OnPilotDead ) + self:EventOnCrash( self.OnCrash ) + self:EventOnEjection( self.OnEjection ) + Controllable:OptionROEHoldFire() Controllable:OptionROTVertical() - + self.Controllable:OnReSpawn( function( PatrolGroup ) self:E( "ReSpawn" ) @@ -25234,7 +25286,7 @@ end --- @param Wrapper.Controllable#CONTROLLABLE Controllable function AI_PATROL_ZONE:onbeforeDetect( Controllable, From, Event, To ) - return self.DetectUnits + return self.DetectOn and self.DetectActivated end --- @param #AI_PATROL_ZONE self @@ -25265,11 +25317,12 @@ function AI_PATROL_ZONE:onafterDetect( Controllable, From, Event, To ) end end + self:__Detect( self.DetectInterval ) + if Detected == true then - self:__Detected( 1 ) + self:__Detected( 1.5 ) end - self:__Detect( self.DetectInterval ) end --- @param Wrapper.Controllable#CONTROLLABLE AIControllable @@ -25425,7 +25478,7 @@ function AI_PATROL_ZONE:onafterStatus() if RTB == true then self:RTB() else - self:__Status( 30 ) -- Execute the Patrol event after 30 seconds. + self:__Status( 60 ) -- Execute the Patrol event after 30 seconds. end end end @@ -25467,6 +25520,40 @@ function AI_PATROL_ZONE:onafterRTB() end end + +--- @param #AI_PATROL_ZONE self +function AI_PATROL_ZONE:onafterDead() + self:SetDetectionOff() + self:SetStatusOff() +end + +--- @param #AI_PATROL_ZONE self +-- @param Core.Event#EVENTDATA EventData +function AI_PATROL_ZONE:OnCrash( EventData ) + + if self.Controllable:IsAlive() and EventData.IniDCSGroupName == self.Controllable:GetName() then + self:__Crash( 1, EventData ) + end +end + +--- @param #AI_PATROL_ZONE self +-- @param Core.Event#EVENTDATA EventData +function AI_PATROL_ZONE:OnEjection( EventData ) + + if self.Controllable:IsAlive() and EventData.IniDCSGroupName == self.Controllable:GetName() then + self:__Eject( 1, EventData ) + end +end + +--- @param #AI_PATROL_ZONE self +-- @param Core.Event#EVENTDATA EventData +function AI_PATROL_ZONE:OnPilotDead( EventData ) + + if self.Controllable:IsAlive() and EventData.IniDCSGroupName == self.Controllable:GetName() then + self:__PilotDead( 1, EventData ) + end +end + --- Single-Player:**Yes** / Mulit-Player:**Yes** / AI:**Yes** / Human:**No** / Types:**Air** -- **Provide Close Air Support to friendly ground troops.** -- --  @@ -25483,7 +25570,7 @@ end -- --  -- --- The AI_CAS_ZONE is assigned a @(Group) and this must be done before the AI_CAS_ZONE process can be started through the **Start** event. +-- The AI_CAS_ZONE is assigned a @{Group} and this must be done before the AI_CAS_ZONE process can be started through the **Start** event. -- --  -- @@ -25591,7 +25678,7 @@ end -- @type AI_CAS_ZONE -- @field Wrapper.Controllable#CONTROLLABLE AIControllable The @{Controllable} patrolling. -- @field Core.Zone#ZONE_BASE TargetZone The @{Zone} where the patrol needs to be executed. --- @extends AI.AI_Patrol#AI_CAS_ZONE +-- @extends AI.AI_Patrol#AI_PATROL_ZONE AI_CAS_ZONE = { ClassName = "AI_CAS_ZONE", } @@ -25803,24 +25890,10 @@ end -- @param #string To The To State string. function AI_CAS_ZONE:onafterStart( Controllable, From, Event, To ) - - self:Route() - self:__Status( 30 ) -- Check status status every 30 seconds. - self:__Detect( self.DetectInterval ) -- Detect for new targets every DetectInterval in the EngageZone. - + -- Call the parent Start event handler + self:GetParent(self).onafterStart( self, Controllable, From, Event, To ) self:EventOnDead( self.OnDead ) - Controllable:OptionROEHoldFire() - Controllable:OptionROTVertical() - - self.Controllable:OnReSpawn( - function( PatrolGroup ) - self:E( "ReSpawn" ) - self:__Reset() - self:__Route( 5 ) - end - ) - end --- @param Wrapper.Controllable#CONTROLLABLE AIControllable @@ -25853,8 +25926,6 @@ function AI_CAS_ZONE:onafterEngage( Controllable, From, Event, To ) if Controllable:IsAlive() then - self:Detect( self.EngageZone ) - local EngageRoute = {} --- Calculate the current route point. @@ -25985,7 +26056,7 @@ end -- @param #string To The To State string. function AI_CAS_ZONE:onafterAccomplish( Controllable, From, Event, To ) self.Accomplished = true - self.DetectUnits = false + self:SetDetectionOff() end --- @param #AI_CAS_ZONE self @@ -26013,7 +26084,7 @@ end -- --  -- --- The AI_CAP_ZONE is assigned a @(Group) and this must be done before the AI_CAP_ZONE process can be started using the **Start** event. +-- The AI_CAP_ZONE is assigned a @{Group} and this must be done before the AI_CAP_ZONE process can be started using the **Start** event. -- --  -- @@ -26104,7 +26175,9 @@ end -- * **[Quax](https://forums.eagle.ru/member.php?u=90530)**: Concept, Advice & Testing. -- * **[Pikey](https://forums.eagle.ru/member.php?u=62835)**: Concept, Advice & Testing. -- * **[Gunterlund](http://forums.eagle.ru:8080/member.php?u=75036)**: Test case revision. --- +-- * **[Whisper](http://forums.eagle.ru/member.php?u=3829): Testing. +-- * **[Delta99](https://forums.eagle.ru/member.php?u=125166): Testing. +-- -- ### Authors: -- -- * **FlightControl**: Concept, Design & Programming. @@ -26337,23 +26410,9 @@ end -- @param #string To The To State string. function AI_CAP_ZONE:onafterStart( Controllable, From, Event, To ) + -- Call the parent Start event handler + self:GetParent(self).onafterStart( self, Controllable, From, Event, To ) - self:Route() - self:__Status( 30 ) -- Check status status every 30 seconds. - self:__Detect( self.DetectInterval ) -- Detect for new targets every DetectInterval in the EngageZone. - - self:EventOnDead( self.OnDead ) - - Controllable:OptionROEOpenFire() - - self.Controllable:OnReSpawn( - function( PatrolGroup ) - self:E( "ReSpawn" ) - self:__Reset() - self:__Route( 5 ) - end - ) - end --- @param Wrapper.Controllable#CONTROLLABLE AIControllable @@ -26415,8 +26474,6 @@ function AI_CAP_ZONE:onafterEngage( Controllable, From, Event, To ) if Controllable:IsAlive() then - self:Detect( self.EngageZone ) - local EngageRoute = {} --- Calculate the current route point. @@ -26467,7 +26524,7 @@ function AI_CAP_ZONE:onafterEngage( Controllable, From, Event, To ) for DetectedUnitID, DetectedUnit in pairs( self.DetectedUnits ) do local DetectedUnit = DetectedUnit -- Wrapper.Unit#UNIT - self:T( DetectedUnit ) + self:T( { DetectedUnit, DetectedUnit:IsAlive(), DetectedUnit:IsAir() } ) if DetectedUnit:IsAlive() and DetectedUnit:IsAir() then if self.EngageZone then if DetectedUnit:IsInZone( self.EngageZone ) then @@ -26495,8 +26552,9 @@ function AI_CAP_ZONE:onafterEngage( Controllable, From, Event, To ) if #AttackTasks == 0 then self:E("No targets found -> Going back to Patrolling") - self:Accomplish() - self:Route() + self:__Accomplish( 1 ) + self:__Route( 1 ) + self:SetDetectionActivated() else EngageRoute[1].task = Controllable:TaskCombo( AttackTasks ) @@ -26504,10 +26562,11 @@ function AI_CAP_ZONE:onafterEngage( Controllable, From, Event, To ) self.Controllable:SetState( self.Controllable, "EngageZone", self ) self.Controllable:WayPointFunction( #EngageRoute, 1, "_NewEngageCapRoute" ) - + + self:SetDetectionDeactivated() end - --- NOW ROUTE THE GROUP! + --- NOW ROUTE THE GROUP! self.Controllable:WayPointExecute( 1, 2 ) end @@ -26535,17 +26594,7 @@ end -- @param #string To The To State string. function AI_CAP_ZONE:onafterAccomplish( Controllable, From, Event, To ) self.Accomplished = true - self.DetectUnits = false -end - ---- @param #AI_CAP_ZONE self --- @param Core.Event#EVENTDATA EventData -function AI_CAP_ZONE:OnDead( EventData ) - self:T( { "EventDead", EventData } ) - - if EventData.IniDCSUnit then - self:__Destroy( 1, EventData ) - end + self:SetDetectionOff() end diff --git a/Moose Test Missions/ABP - Airbase Police/APL-001 - Caucasus/APL-001 - Caucasus.miz b/Moose Test Missions/ABP - Airbase Police/APL-001 - Caucasus/APL-001 - Caucasus.miz index 69b8190b6..3973875f2 100644 Binary files a/Moose Test Missions/ABP - Airbase Police/APL-001 - Caucasus/APL-001 - Caucasus.miz and b/Moose Test Missions/ABP - Airbase Police/APL-001 - Caucasus/APL-001 - Caucasus.miz differ diff --git a/Moose Test Missions/ABP - Airbase Police/APL-002 - Nevada/APL-002 - Nevada.miz b/Moose Test Missions/ABP - Airbase Police/APL-002 - Nevada/APL-002 - Nevada.miz index 1f42080a9..5f6d100ac 100644 Binary files a/Moose Test Missions/ABP - Airbase Police/APL-002 - Nevada/APL-002 - Nevada.miz and b/Moose Test Missions/ABP - Airbase Police/APL-002 - Nevada/APL-002 - Nevada.miz differ diff --git a/Moose Test Missions/ACL - Airbase Cleaner/ACL-001 - Airbase CleanUp/ACL-001 - Airbase CleanUp.miz b/Moose Test Missions/ACL - Airbase Cleaner/ACL-001 - Airbase CleanUp/ACL-001 - Airbase CleanUp.miz index 196e7125e..25ef5d2af 100644 Binary files a/Moose Test Missions/ACL - Airbase Cleaner/ACL-001 - Airbase CleanUp/ACL-001 - Airbase CleanUp.miz and b/Moose Test Missions/ACL - Airbase Cleaner/ACL-001 - Airbase CleanUp/ACL-001 - Airbase CleanUp.miz differ diff --git a/Moose Test Missions/AIB - AI Balancing/AIB-001 - Spawned AI/AIB-001 - Spawned AI.miz b/Moose Test Missions/AIB - AI Balancing/AIB-001 - Spawned AI/AIB-001 - Spawned AI.miz index d081431ac..cc5984a01 100644 Binary files a/Moose Test Missions/AIB - AI Balancing/AIB-001 - Spawned AI/AIB-001 - Spawned AI.miz and b/Moose Test Missions/AIB - AI Balancing/AIB-001 - Spawned AI/AIB-001 - Spawned AI.miz differ diff --git a/Moose Test Missions/AIB - AI Balancing/AIB-002 - Patrol AI/AIB-002 - Patrol AI.miz b/Moose Test Missions/AIB - AI Balancing/AIB-002 - Patrol AI/AIB-002 - Patrol AI.miz index ff179b0c7..ceb060cbc 100644 Binary files a/Moose Test Missions/AIB - AI Balancing/AIB-002 - Patrol AI/AIB-002 - Patrol AI.miz and b/Moose Test Missions/AIB - AI Balancing/AIB-002 - Patrol AI/AIB-002 - Patrol AI.miz differ diff --git a/Moose Test Missions/AIB - AI Balancing/AIB-003 - Two coalitions InitCleanUp test/AIB-003 - Two coalitions InitCleanUp test.miz b/Moose Test Missions/AIB - AI Balancing/AIB-003 - Two coalitions InitCleanUp test/AIB-003 - Two coalitions InitCleanUp test.miz index 3a89510dd..3feeeb1a7 100644 Binary files a/Moose Test Missions/AIB - AI Balancing/AIB-003 - Two coalitions InitCleanUp test/AIB-003 - Two coalitions InitCleanUp test.miz and b/Moose Test Missions/AIB - AI Balancing/AIB-003 - Two coalitions InitCleanUp test/AIB-003 - Two coalitions InitCleanUp test.miz differ diff --git a/Moose Test Missions/AIB - AI Balancing/AIB-004 - Respawn Test when Destroyed/AIB-004 - Respawn Test when Destroyed.miz b/Moose Test Missions/AIB - AI Balancing/AIB-004 - Respawn Test when Destroyed/AIB-004 - Respawn Test when Destroyed.miz index ecc8c46cd..0eb17b930 100644 Binary files a/Moose Test Missions/AIB - AI Balancing/AIB-004 - Respawn Test when Destroyed/AIB-004 - Respawn Test when Destroyed.miz and b/Moose Test Missions/AIB - AI Balancing/AIB-004 - Respawn Test when Destroyed/AIB-004 - Respawn Test when Destroyed.miz differ diff --git a/Moose Test Missions/AIB - AI Balancing/AIB-005 - Patrol AI and Randomize Zones/AIB-005 - Patrol AI and Randomize Zones.miz b/Moose Test Missions/AIB - AI Balancing/AIB-005 - Patrol AI and Randomize Zones/AIB-005 - Patrol AI and Randomize Zones.miz index 772b3d939..f36a9a476 100644 Binary files a/Moose Test Missions/AIB - AI Balancing/AIB-005 - Patrol AI and Randomize Zones/AIB-005 - Patrol AI and Randomize Zones.miz and b/Moose Test Missions/AIB - AI Balancing/AIB-005 - Patrol AI and Randomize Zones/AIB-005 - Patrol AI and Randomize Zones.miz differ diff --git a/Moose Test Missions/AIB - AI Balancing/AIB-006 - Declutter AI at Airbases/AIB-006 - Declutter AI at Airbases.miz b/Moose Test Missions/AIB - AI Balancing/AIB-006 - Declutter AI at Airbases/AIB-006 - Declutter AI at Airbases.miz index 13541bd70..eb1db3feb 100644 Binary files a/Moose Test Missions/AIB - AI Balancing/AIB-006 - Declutter AI at Airbases/AIB-006 - Declutter AI at Airbases.miz and b/Moose Test Missions/AIB - AI Balancing/AIB-006 - Declutter AI at Airbases/AIB-006 - Declutter AI at Airbases.miz differ diff --git a/Moose Test Missions/CAP - Combat Air Patrol/CAP-001 - Combat Air Patrol/CAP-001 - Combat Air Patrol.miz b/Moose Test Missions/CAP - Combat Air Patrol/CAP-001 - Combat Air Patrol/CAP-001 - Combat Air Patrol.miz index dc4ceadc4..ac476310f 100644 Binary files a/Moose Test Missions/CAP - Combat Air Patrol/CAP-001 - Combat Air Patrol/CAP-001 - Combat Air Patrol.miz and b/Moose Test Missions/CAP - Combat Air Patrol/CAP-001 - Combat Air Patrol/CAP-001 - Combat Air Patrol.miz differ diff --git a/Moose Test Missions/CAP - Combat Air Patrol/CAP-010 - CAP and Engage within Range/CAP-010 - CAP and Engage within Range.miz b/Moose Test Missions/CAP - Combat Air Patrol/CAP-010 - CAP and Engage within Range/CAP-010 - CAP and Engage within Range.miz index 936a6cda6..83dc5b234 100644 Binary files a/Moose Test Missions/CAP - Combat Air Patrol/CAP-010 - CAP and Engage within Range/CAP-010 - CAP and Engage within Range.miz and b/Moose Test Missions/CAP - Combat Air Patrol/CAP-010 - CAP and Engage within Range/CAP-010 - CAP and Engage within Range.miz differ diff --git a/Moose Test Missions/CAP - Combat Air Patrol/CAP-010 - CAP and Engage within Zone/CAP-010 - CAP and Engage within Zone.miz b/Moose Test Missions/CAP - Combat Air Patrol/CAP-010 - CAP and Engage within Zone/CAP-010 - CAP and Engage within Zone.miz index 705139400..818f3886c 100644 Binary files a/Moose Test Missions/CAP - Combat Air Patrol/CAP-010 - CAP and Engage within Zone/CAP-010 - CAP and Engage within Zone.miz and b/Moose Test Missions/CAP - Combat Air Patrol/CAP-010 - CAP and Engage within Zone/CAP-010 - CAP and Engage within Zone.miz differ diff --git a/Moose Test Missions/CAS - Close Air Support/CAS-001 - CAS in a ZONE/CAS-001 - CAS in a ZONE.miz b/Moose Test Missions/CAS - Close Air Support/CAS-001 - CAS in a ZONE/CAS-001 - CAS in a ZONE.miz index b9a4b9a0a..698e0358a 100644 Binary files a/Moose Test Missions/CAS - Close Air Support/CAS-001 - CAS in a ZONE/CAS-001 - CAS in a ZONE.miz and b/Moose Test Missions/CAS - Close Air Support/CAS-001 - CAS in a ZONE/CAS-001 - CAS in a ZONE.miz differ diff --git a/Moose Test Missions/CAS - Close Air Support/CAS-001 - CAS in a ZONE/CAS-001 - Manual Test.miz b/Moose Test Missions/CAS - Close Air Support/CAS-001 - CAS in a ZONE/CAS-001 - Manual Test.miz index a1f6b5ca8..a4be72495 100644 Binary files a/Moose Test Missions/CAS - Close Air Support/CAS-001 - CAS in a ZONE/CAS-001 - Manual Test.miz and b/Moose Test Missions/CAS - Close Air Support/CAS-001 - CAS in a ZONE/CAS-001 - Manual Test.miz differ diff --git a/Moose Test Missions/CGO - Cargo/CGO-001 - Unit Boarding/CGO-001 - Unit Boarding.miz b/Moose Test Missions/CGO - Cargo/CGO-001 - Unit Boarding/CGO-001 - Unit Boarding.miz index 7f0505c7f..408240b41 100644 Binary files a/Moose Test Missions/CGO - Cargo/CGO-001 - Unit Boarding/CGO-001 - Unit Boarding.miz and b/Moose Test Missions/CGO - Cargo/CGO-001 - Unit Boarding/CGO-001 - Unit Boarding.miz differ diff --git a/Moose Test Missions/CGO - Cargo/CGO-002 - Unit Unboarding/CGO-002 - Unit Unboarding.miz b/Moose Test Missions/CGO - Cargo/CGO-002 - Unit Unboarding/CGO-002 - Unit Unboarding.miz index 304357caf..9e8678047 100644 Binary files a/Moose Test Missions/CGO - Cargo/CGO-002 - Unit Unboarding/CGO-002 - Unit Unboarding.miz and b/Moose Test Missions/CGO - Cargo/CGO-002 - Unit Unboarding/CGO-002 - Unit Unboarding.miz differ diff --git a/Moose Test Missions/CGO - Cargo/CGO-003 - Unit Transferring/CGO-003 - Unit Transferring.miz b/Moose Test Missions/CGO - Cargo/CGO-003 - Unit Transferring/CGO-003 - Unit Transferring.miz index 4ef50a887..406d1ea2d 100644 Binary files a/Moose Test Missions/CGO - Cargo/CGO-003 - Unit Transferring/CGO-003 - Unit Transferring.miz and b/Moose Test Missions/CGO - Cargo/CGO-003 - Unit Transferring/CGO-003 - Unit Transferring.miz differ diff --git a/Moose Test Missions/CGO - Cargo/CGO-101 - Group Boarding/CGO-101 - Group Boarding.miz b/Moose Test Missions/CGO - Cargo/CGO-101 - Group Boarding/CGO-101 - Group Boarding.miz index f81573419..48b4390a6 100644 Binary files a/Moose Test Missions/CGO - Cargo/CGO-101 - Group Boarding/CGO-101 - Group Boarding.miz and b/Moose Test Missions/CGO - Cargo/CGO-101 - Group Boarding/CGO-101 - Group Boarding.miz differ diff --git a/Moose Test Missions/CGO - Cargo/CGO-102 - Group Unboarding/CGO-102 - Group Unboarding.miz b/Moose Test Missions/CGO - Cargo/CGO-102 - Group Unboarding/CGO-102 - Group Unboarding.miz index 91bcabb31..58a83e558 100644 Binary files a/Moose Test Missions/CGO - Cargo/CGO-102 - Group Unboarding/CGO-102 - Group Unboarding.miz and b/Moose Test Missions/CGO - Cargo/CGO-102 - Group Unboarding/CGO-102 - Group Unboarding.miz differ diff --git a/Moose Test Missions/CGO - Cargo/CGO-103 - Group Transferring/CGO-103 - Group Transferring.miz b/Moose Test Missions/CGO - Cargo/CGO-103 - Group Transferring/CGO-103 - Group Transferring.miz index 3ca7000e7..8cb8af7fe 100644 Binary files a/Moose Test Missions/CGO - Cargo/CGO-103 - Group Transferring/CGO-103 - Group Transferring.miz and b/Moose Test Missions/CGO - Cargo/CGO-103 - Group Transferring/CGO-103 - Group Transferring.miz differ diff --git a/Moose Test Missions/CGO - Cargo/CGO-201 - Package Boarding/CGO-201 - Package Boarding.miz b/Moose Test Missions/CGO - Cargo/CGO-201 - Package Boarding/CGO-201 - Package Boarding.miz index b6d70f09d..034515f4f 100644 Binary files a/Moose Test Missions/CGO - Cargo/CGO-201 - Package Boarding/CGO-201 - Package Boarding.miz and b/Moose Test Missions/CGO - Cargo/CGO-201 - Package Boarding/CGO-201 - Package Boarding.miz differ diff --git a/Moose Test Missions/CGO - Cargo/CGO-202 - Package Unboarding/CGO-202 - Package Unboarding.miz b/Moose Test Missions/CGO - Cargo/CGO-202 - Package Unboarding/CGO-202 - Package Unboarding.miz index 2c3a99429..d3d4231ec 100644 Binary files a/Moose Test Missions/CGO - Cargo/CGO-202 - Package Unboarding/CGO-202 - Package Unboarding.miz and b/Moose Test Missions/CGO - Cargo/CGO-202 - Package Unboarding/CGO-202 - Package Unboarding.miz differ diff --git a/Moose Test Missions/DET - Detection/DET-001 - Detection Areas/DET-001 - Detection Areas.miz b/Moose Test Missions/DET - Detection/DET-001 - Detection Areas/DET-001 - Detection Areas.miz index 1b32d1b58..670aa650b 100644 Binary files a/Moose Test Missions/DET - Detection/DET-001 - Detection Areas/DET-001 - Detection Areas.miz and b/Moose Test Missions/DET - Detection/DET-001 - Detection Areas/DET-001 - Detection Areas.miz differ diff --git a/Moose Test Missions/DET - Detection/DET-101 - Detection Reporting/DET-101 - Detection Reporting.miz b/Moose Test Missions/DET - Detection/DET-101 - Detection Reporting/DET-101 - Detection Reporting.miz index d445f5128..5f8be5603 100644 Binary files a/Moose Test Missions/DET - Detection/DET-101 - Detection Reporting/DET-101 - Detection Reporting.miz and b/Moose Test Missions/DET - Detection/DET-101 - Detection Reporting/DET-101 - Detection Reporting.miz differ diff --git a/Moose Test Missions/ESC - Escorting/ESC-001 - Escorting Helicopters/ESC-001 - Escorting Helicopters.miz b/Moose Test Missions/ESC - Escorting/ESC-001 - Escorting Helicopters/ESC-001 - Escorting Helicopters.miz index 23d06b8c9..7186b303d 100644 Binary files a/Moose Test Missions/ESC - Escorting/ESC-001 - Escorting Helicopters/ESC-001 - Escorting Helicopters.miz and b/Moose Test Missions/ESC - Escorting/ESC-001 - Escorting Helicopters/ESC-001 - Escorting Helicopters.miz differ diff --git a/Moose Test Missions/FSM - Finite State Machine/FSM-100 - Transition Explanation/FSM-100 - Transition Explanation.miz b/Moose Test Missions/FSM - Finite State Machine/FSM-100 - Transition Explanation/FSM-100 - Transition Explanation.miz index 7c69b1ae9..a5e5ff1aa 100644 Binary files a/Moose Test Missions/FSM - Finite State Machine/FSM-100 - Transition Explanation/FSM-100 - Transition Explanation.miz and b/Moose Test Missions/FSM - Finite State Machine/FSM-100 - Transition Explanation/FSM-100 - Transition Explanation.miz differ diff --git a/Moose Test Missions/GRP - Group Commands/GRP-200 - Follow Group/GRP-200 - Follow Group.miz b/Moose Test Missions/GRP - Group Commands/GRP-200 - Follow Group/GRP-200 - Follow Group.miz index abe076c97..014ce79c4 100644 Binary files a/Moose Test Missions/GRP - Group Commands/GRP-200 - Follow Group/GRP-200 - Follow Group.miz and b/Moose Test Missions/GRP - Group Commands/GRP-200 - Follow Group/GRP-200 - Follow Group.miz differ diff --git a/Moose Test Missions/GRP - Group Commands/GRP-300 - Switch WayPoints/GRP-300 - Switch WayPoints.miz b/Moose Test Missions/GRP - Group Commands/GRP-300 - Switch WayPoints/GRP-300 - Switch WayPoints.miz index 2a7df90f6..e8d7f7209 100644 Binary files a/Moose Test Missions/GRP - Group Commands/GRP-300 - Switch WayPoints/GRP-300 - Switch WayPoints.miz and b/Moose Test Missions/GRP - Group Commands/GRP-300 - Switch WayPoints/GRP-300 - Switch WayPoints.miz differ diff --git a/Moose Test Missions/GRP - Group Commands/Moose_Test_WRAPPER.miz b/Moose Test Missions/GRP - Group Commands/Moose_Test_WRAPPER.miz index c8430de80..948a18e31 100644 Binary files a/Moose Test Missions/GRP - Group Commands/Moose_Test_WRAPPER.miz and b/Moose Test Missions/GRP - Group Commands/Moose_Test_WRAPPER.miz differ diff --git a/Moose Test Missions/MEN - Menu Options/MEN-001 - Menu Client/MEN-001 - Menu Client.miz b/Moose Test Missions/MEN - Menu Options/MEN-001 - Menu Client/MEN-001 - Menu Client.miz index 5a7c87f98..6c64db365 100644 Binary files a/Moose Test Missions/MEN - Menu Options/MEN-001 - Menu Client/MEN-001 - Menu Client.miz and b/Moose Test Missions/MEN - Menu Options/MEN-001 - Menu Client/MEN-001 - Menu Client.miz differ diff --git a/Moose Test Missions/MEN - Menu Options/MEN-002 - Menu Coalition/MEN-002 - Menu Coalition.miz b/Moose Test Missions/MEN - Menu Options/MEN-002 - Menu Coalition/MEN-002 - Menu Coalition.miz index a428c9c86..63d3e306c 100644 Binary files a/Moose Test Missions/MEN - Menu Options/MEN-002 - Menu Coalition/MEN-002 - Menu Coalition.miz and b/Moose Test Missions/MEN - Menu Options/MEN-002 - Menu Coalition/MEN-002 - Menu Coalition.miz differ diff --git a/Moose Test Missions/MEN - Menu Options/MEN-003 - Menu Group/MEN-003 - Menu Group.miz b/Moose Test Missions/MEN - Menu Options/MEN-003 - Menu Group/MEN-003 - Menu Group.miz index 8322e8f62..40723eeb2 100644 Binary files a/Moose Test Missions/MEN - Menu Options/MEN-003 - Menu Group/MEN-003 - Menu Group.miz and b/Moose Test Missions/MEN - Menu Options/MEN-003 - Menu Group/MEN-003 - Menu Group.miz differ diff --git a/Moose Test Missions/MIT - Missile Trainer/MIT-001 - Missile Trainer/MIT-001 - Missile Trainer.miz b/Moose Test Missions/MIT - Missile Trainer/MIT-001 - Missile Trainer/MIT-001 - Missile Trainer.miz index 592dd05da..89e89d96b 100644 Binary files a/Moose Test Missions/MIT - Missile Trainer/MIT-001 - Missile Trainer/MIT-001 - Missile Trainer.miz and b/Moose Test Missions/MIT - Missile Trainer/MIT-001 - Missile Trainer/MIT-001 - Missile Trainer.miz differ diff --git a/Moose Test Missions/MOOSE_Test_Template.miz b/Moose Test Missions/MOOSE_Test_Template.miz index 31b824c41..e272cfdad 100644 Binary files a/Moose Test Missions/MOOSE_Test_Template.miz and b/Moose Test Missions/MOOSE_Test_Template.miz differ diff --git a/Moose Test Missions/PAT - Patrolling/PAT-001 - Switching Patrol Zones/PAT-001 - Switching Patrol Zones.miz b/Moose Test Missions/PAT - Patrolling/PAT-001 - Switching Patrol Zones/PAT-001 - Switching Patrol Zones.miz index 7ce81baab..896613e0b 100644 Binary files a/Moose Test Missions/PAT - Patrolling/PAT-001 - Switching Patrol Zones/PAT-001 - Switching Patrol Zones.miz and b/Moose Test Missions/PAT - Patrolling/PAT-001 - Switching Patrol Zones/PAT-001 - Switching Patrol Zones.miz differ diff --git a/Moose Test Missions/SCH - Scheduler/SCH-000 - Simple Scheduling/SCH-000 - Simple Scheduling.miz b/Moose Test Missions/SCH - Scheduler/SCH-000 - Simple Scheduling/SCH-000 - Simple Scheduling.miz index 3ad072a39..3efe78840 100644 Binary files a/Moose Test Missions/SCH - Scheduler/SCH-000 - Simple Scheduling/SCH-000 - Simple Scheduling.miz and b/Moose Test Missions/SCH - Scheduler/SCH-000 - Simple Scheduling/SCH-000 - Simple Scheduling.miz differ diff --git a/Moose Test Missions/SCH - Scheduler/SCH-001 - Simple Object Scheduling/SCH-001 - Simple Object Scheduling.miz b/Moose Test Missions/SCH - Scheduler/SCH-001 - Simple Object Scheduling/SCH-001 - Simple Object Scheduling.miz index c0d7d9922..85a492e5e 100644 Binary files a/Moose Test Missions/SCH - Scheduler/SCH-001 - Simple Object Scheduling/SCH-001 - Simple Object Scheduling.miz and b/Moose Test Missions/SCH - Scheduler/SCH-001 - Simple Object Scheduling/SCH-001 - Simple Object Scheduling.miz differ diff --git a/Moose Test Missions/SCH - Scheduler/SCH-100 - Simple Repeat Scheduling/SCH-100 - Simple Repeat Scheduling.miz b/Moose Test Missions/SCH - Scheduler/SCH-100 - Simple Repeat Scheduling/SCH-100 - Simple Repeat Scheduling.miz index 08f643cb9..2358dafb5 100644 Binary files a/Moose Test Missions/SCH - Scheduler/SCH-100 - Simple Repeat Scheduling/SCH-100 - Simple Repeat Scheduling.miz and b/Moose Test Missions/SCH - Scheduler/SCH-100 - Simple Repeat Scheduling/SCH-100 - Simple Repeat Scheduling.miz differ diff --git a/Moose Test Missions/SCH - Scheduler/SCH-110 - Object Repeat Scheduling/SCH-110 - Object Repeat Scheduling.miz b/Moose Test Missions/SCH - Scheduler/SCH-110 - Object Repeat Scheduling/SCH-110 - Object Repeat Scheduling.miz index 34db8ea48..b24865b53 100644 Binary files a/Moose Test Missions/SCH - Scheduler/SCH-110 - Object Repeat Scheduling/SCH-110 - Object Repeat Scheduling.miz and b/Moose Test Missions/SCH - Scheduler/SCH-110 - Object Repeat Scheduling/SCH-110 - Object Repeat Scheduling.miz differ diff --git a/Moose Test Missions/SCH - Scheduler/SCH-200 - Simple Repeat Scheduling Stop and Start/SCH-200 - Simple Repeat Scheduling Stop and Start.miz b/Moose Test Missions/SCH - Scheduler/SCH-200 - Simple Repeat Scheduling Stop and Start/SCH-200 - Simple Repeat Scheduling Stop and Start.miz index 1db4a1df9..7232e635e 100644 Binary files a/Moose Test Missions/SCH - Scheduler/SCH-200 - Simple Repeat Scheduling Stop and Start/SCH-200 - Simple Repeat Scheduling Stop and Start.miz and b/Moose Test Missions/SCH - Scheduler/SCH-200 - Simple Repeat Scheduling Stop and Start/SCH-200 - Simple Repeat Scheduling Stop and Start.miz differ diff --git a/Moose Test Missions/SCH - Scheduler/SCH-300 - GC Simple Object Scheduling/SCH-300 - GC Simple Object Scheduling.miz b/Moose Test Missions/SCH - Scheduler/SCH-300 - GC Simple Object Scheduling/SCH-300 - GC Simple Object Scheduling.miz index a3236fccc..05a5d07d6 100644 Binary files a/Moose Test Missions/SCH - Scheduler/SCH-300 - GC Simple Object Scheduling/SCH-300 - GC Simple Object Scheduling.miz and b/Moose Test Missions/SCH - Scheduler/SCH-300 - GC Simple Object Scheduling/SCH-300 - GC Simple Object Scheduling.miz differ diff --git a/Moose Test Missions/SCH - Scheduler/SCH-310 - GC Object Repeat Scheduling/SCH-310 - GC Object Repeat Scheduling.miz b/Moose Test Missions/SCH - Scheduler/SCH-310 - GC Object Repeat Scheduling/SCH-310 - GC Object Repeat Scheduling.miz index 3bb2eaee7..629391f82 100644 Binary files a/Moose Test Missions/SCH - Scheduler/SCH-310 - GC Object Repeat Scheduling/SCH-310 - GC Object Repeat Scheduling.miz and b/Moose Test Missions/SCH - Scheduler/SCH-310 - GC Object Repeat Scheduling/SCH-310 - GC Object Repeat Scheduling.miz differ diff --git a/Moose Test Missions/SET - Data Sets/SET-001 - Airbase Sets/SET-001 - Airbase Sets.miz b/Moose Test Missions/SET - Data Sets/SET-001 - Airbase Sets/SET-001 - Airbase Sets.miz index f4f865d13..250448ff8 100644 Binary files a/Moose Test Missions/SET - Data Sets/SET-001 - Airbase Sets/SET-001 - Airbase Sets.miz and b/Moose Test Missions/SET - Data Sets/SET-001 - Airbase Sets/SET-001 - Airbase Sets.miz differ diff --git a/Moose Test Missions/SET - Data Sets/SET-101 - Group Sets/SET-101 - Group Sets.miz b/Moose Test Missions/SET - Data Sets/SET-101 - Group Sets/SET-101 - Group Sets.miz index aa98512c0..6e2f66de4 100644 Binary files a/Moose Test Missions/SET - Data Sets/SET-101 - Group Sets/SET-101 - Group Sets.miz and b/Moose Test Missions/SET - Data Sets/SET-101 - Group Sets/SET-101 - Group Sets.miz differ diff --git a/Moose Test Missions/SET - Data Sets/SET-201 - Client Sets/SET-201 - Client Sets.miz b/Moose Test Missions/SET - Data Sets/SET-201 - Client Sets/SET-201 - Client Sets.miz index 5b70c77fd..e62678b67 100644 Binary files a/Moose Test Missions/SET - Data Sets/SET-201 - Client Sets/SET-201 - Client Sets.miz and b/Moose Test Missions/SET - Data Sets/SET-201 - Client Sets/SET-201 - Client Sets.miz differ diff --git a/Moose Test Missions/SEV - SEAD Evasion/SEV-001 - SEAD Evasion/SEV-001 - SEAD Evasion.miz b/Moose Test Missions/SEV - SEAD Evasion/SEV-001 - SEAD Evasion/SEV-001 - SEAD Evasion.miz index 3a5c951bb..7982420d4 100644 Binary files a/Moose Test Missions/SEV - SEAD Evasion/SEV-001 - SEAD Evasion/SEV-001 - SEAD Evasion.miz and b/Moose Test Missions/SEV - SEAD Evasion/SEV-001 - SEAD Evasion/SEV-001 - SEAD Evasion.miz differ diff --git a/Moose Test Missions/SPA - Spawning/SPA-010 - Spawn Demo/SPA-010 - Spawn Demo.miz b/Moose Test Missions/SPA - Spawning/SPA-010 - Spawn Demo/SPA-010 - Spawn Demo.miz index f1a2bed6c..2dd55d76c 100644 Binary files a/Moose Test Missions/SPA - Spawning/SPA-010 - Spawn Demo/SPA-010 - Spawn Demo.miz and b/Moose Test Missions/SPA - Spawning/SPA-010 - Spawn Demo/SPA-010 - Spawn Demo.miz differ diff --git a/Moose Test Missions/SPA - Spawning/SPA-011 - Ground Ops - Simple Spawning/SPA-011 - Ground Ops - Simple Spawning.miz b/Moose Test Missions/SPA - Spawning/SPA-011 - Ground Ops - Simple Spawning/SPA-011 - Ground Ops - Simple Spawning.miz index 77d59f731..7ba6a0a43 100644 Binary files a/Moose Test Missions/SPA - Spawning/SPA-011 - Ground Ops - Simple Spawning/SPA-011 - Ground Ops - Simple Spawning.miz and b/Moose Test Missions/SPA - Spawning/SPA-011 - Ground Ops - Simple Spawning/SPA-011 - Ground Ops - Simple Spawning.miz differ diff --git a/Moose Test Missions/SPA - Spawning/SPA-012 - Ground Ops - Multiple Spawns/SPA-012 - Ground Ops - Multiple Spawns.miz b/Moose Test Missions/SPA - Spawning/SPA-012 - Ground Ops - Multiple Spawns/SPA-012 - Ground Ops - Multiple Spawns.miz index 110dceb8f..363239a0b 100644 Binary files a/Moose Test Missions/SPA - Spawning/SPA-012 - Ground Ops - Multiple Spawns/SPA-012 - Ground Ops - Multiple Spawns.miz and b/Moose Test Missions/SPA - Spawning/SPA-012 - Ground Ops - Multiple Spawns/SPA-012 - Ground Ops - Multiple Spawns.miz differ diff --git a/Moose Test Missions/SPA - Spawning/SPA-013 - Ground Ops - Scheduled Spawns/SPA-013 - Ground Ops - Scheduled Spawns.miz b/Moose Test Missions/SPA - Spawning/SPA-013 - Ground Ops - Scheduled Spawns/SPA-013 - Ground Ops - Scheduled Spawns.miz index cf3bc2187..c212e1e61 100644 Binary files a/Moose Test Missions/SPA - Spawning/SPA-013 - Ground Ops - Scheduled Spawns/SPA-013 - Ground Ops - Scheduled Spawns.miz and b/Moose Test Missions/SPA - Spawning/SPA-013 - Ground Ops - Scheduled Spawns/SPA-013 - Ground Ops - Scheduled Spawns.miz differ diff --git a/Moose Test Missions/SPA - Spawning/SPA-014 - Ground Ops - Scheduled Spawns Limited/SPA-014 - Ground Ops - Scheduled Spawns Limited.miz b/Moose Test Missions/SPA - Spawning/SPA-014 - Ground Ops - Scheduled Spawns Limited/SPA-014 - Ground Ops - Scheduled Spawns Limited.miz index 3f5f562b9..ed17829ed 100644 Binary files a/Moose Test Missions/SPA - Spawning/SPA-014 - Ground Ops - Scheduled Spawns Limited/SPA-014 - Ground Ops - Scheduled Spawns Limited.miz and b/Moose Test Missions/SPA - Spawning/SPA-014 - Ground Ops - Scheduled Spawns Limited/SPA-014 - Ground Ops - Scheduled Spawns Limited.miz differ diff --git a/Moose Test Missions/SPA - Spawning/SPA-015 - Ground Ops - Randomize Route/SPA-015 - Ground Ops - Randomize Route.miz b/Moose Test Missions/SPA - Spawning/SPA-015 - Ground Ops - Randomize Route/SPA-015 - Ground Ops - Randomize Route.miz index 2c4fe1adb..1fb3bc5d7 100644 Binary files a/Moose Test Missions/SPA - Spawning/SPA-015 - Ground Ops - Randomize Route/SPA-015 - Ground Ops - Randomize Route.miz and b/Moose Test Missions/SPA - Spawning/SPA-015 - Ground Ops - Randomize Route/SPA-015 - Ground Ops - Randomize Route.miz differ diff --git a/Moose Test Missions/SPA - Spawning/SPA-016 - Ground Ops - Randomize Zones/SPA-016 - Ground Ops - Randomize Zones.miz b/Moose Test Missions/SPA - Spawning/SPA-016 - Ground Ops - Randomize Zones/SPA-016 - Ground Ops - Randomize Zones.miz index 37f984464..23ec1282f 100644 Binary files a/Moose Test Missions/SPA - Spawning/SPA-016 - Ground Ops - Randomize Zones/SPA-016 - Ground Ops - Randomize Zones.miz and b/Moose Test Missions/SPA - Spawning/SPA-016 - Ground Ops - Randomize Zones/SPA-016 - Ground Ops - Randomize Zones.miz differ diff --git a/Moose Test Missions/SPA - Spawning/SPA-100 - CleanUp Inactive Units/SPA-100 - CleanUp Inactive Units.miz b/Moose Test Missions/SPA - Spawning/SPA-100 - CleanUp Inactive Units/SPA-100 - CleanUp Inactive Units.miz index 14b5c1234..dc945bbc9 100644 Binary files a/Moose Test Missions/SPA - Spawning/SPA-100 - CleanUp Inactive Units/SPA-100 - CleanUp Inactive Units.miz and b/Moose Test Missions/SPA - Spawning/SPA-100 - CleanUp Inactive Units/SPA-100 - CleanUp Inactive Units.miz differ diff --git a/Moose Test Missions/SPA - Spawning/SPA-110 - Limit Spawning/SPA-110 - Limit Spawning.miz b/Moose Test Missions/SPA - Spawning/SPA-110 - Limit Spawning/SPA-110 - Limit Spawning.miz index 7ab9d16f5..7658bd657 100644 Binary files a/Moose Test Missions/SPA - Spawning/SPA-110 - Limit Spawning/SPA-110 - Limit Spawning.miz and b/Moose Test Missions/SPA - Spawning/SPA-110 - Limit Spawning/SPA-110 - Limit Spawning.miz differ diff --git a/Moose Test Missions/SPA - Spawning/SPA-120 - Repeat Spawning/SPA-120 - Repeat Spawning.miz b/Moose Test Missions/SPA - Spawning/SPA-120 - Repeat Spawning/SPA-120 - Repeat Spawning.miz index bc6fcb145..bd0b7ac7d 100644 Binary files a/Moose Test Missions/SPA - Spawning/SPA-120 - Repeat Spawning/SPA-120 - Repeat Spawning.miz and b/Moose Test Missions/SPA - Spawning/SPA-120 - Repeat Spawning/SPA-120 - Repeat Spawning.miz differ diff --git a/Moose Test Missions/SPA - Spawning/SPA-200 - Randomize Unit Types/SPA-200 - Randomize Unit Types.miz b/Moose Test Missions/SPA - Spawning/SPA-200 - Randomize Unit Types/SPA-200 - Randomize Unit Types.miz index 6e5d59d14..644ca630a 100644 Binary files a/Moose Test Missions/SPA - Spawning/SPA-200 - Randomize Unit Types/SPA-200 - Randomize Unit Types.miz and b/Moose Test Missions/SPA - Spawning/SPA-200 - Randomize Unit Types/SPA-200 - Randomize Unit Types.miz differ diff --git a/Moose Test Missions/SPA - Spawning/SPA-220 - Randomize Zones/SPA-220 - Randomize Zones.miz b/Moose Test Missions/SPA - Spawning/SPA-220 - Randomize Zones/SPA-220 - Randomize Zones.miz index 62e0518c5..36e8416e6 100644 Binary files a/Moose Test Missions/SPA - Spawning/SPA-220 - Randomize Zones/SPA-220 - Randomize Zones.miz and b/Moose Test Missions/SPA - Spawning/SPA-220 - Randomize Zones/SPA-220 - Randomize Zones.miz differ diff --git a/Moose Test Missions/SPA - Spawning/SPA-310 - Spawn at Static position/SPA-310 - Spawn at Static position.miz b/Moose Test Missions/SPA - Spawning/SPA-310 - Spawn at Static position/SPA-310 - Spawn at Static position.miz index 16b472608..7cad1deb6 100644 Binary files a/Moose Test Missions/SPA - Spawning/SPA-310 - Spawn at Static position/SPA-310 - Spawn at Static position.miz and b/Moose Test Missions/SPA - Spawning/SPA-310 - Spawn at Static position/SPA-310 - Spawn at Static position.miz differ diff --git a/Moose Test Missions/SPA - Spawning/SPA-320 - Spawn at Unit position/SPA-320 - Spawn at Unit position.miz b/Moose Test Missions/SPA - Spawning/SPA-320 - Spawn at Unit position/SPA-320 - Spawn at Unit position.miz index b30e871b9..e02c08e08 100644 Binary files a/Moose Test Missions/SPA - Spawning/SPA-320 - Spawn at Unit position/SPA-320 - Spawn at Unit position.miz and b/Moose Test Missions/SPA - Spawning/SPA-320 - Spawn at Unit position/SPA-320 - Spawn at Unit position.miz differ diff --git a/Moose Test Missions/SPA - Spawning/SPA-330 - Spawn at Vec2 position/SPA-330 - Spawn at Vec2 position.miz b/Moose Test Missions/SPA - Spawning/SPA-330 - Spawn at Vec2 position/SPA-330 - Spawn at Vec2 position.miz index a25aa52cc..60bab00e5 100644 Binary files a/Moose Test Missions/SPA - Spawning/SPA-330 - Spawn at Vec2 position/SPA-330 - Spawn at Vec2 position.miz and b/Moose Test Missions/SPA - Spawning/SPA-330 - Spawn at Vec2 position/SPA-330 - Spawn at Vec2 position.miz differ diff --git a/Moose Test Missions/SPA - Spawning/SPA-340 - Spawn at Vec3 position/SPA-340 - Spawn at Vec3 position.miz b/Moose Test Missions/SPA - Spawning/SPA-340 - Spawn at Vec3 position/SPA-340 - Spawn at Vec3 position.miz index de64be70e..468ae9c66 100644 Binary files a/Moose Test Missions/SPA - Spawning/SPA-340 - Spawn at Vec3 position/SPA-340 - Spawn at Vec3 position.miz and b/Moose Test Missions/SPA - Spawning/SPA-340 - Spawn at Vec3 position/SPA-340 - Spawn at Vec3 position.miz differ diff --git a/Moose Test Missions/TAD - Task Dispatching/TAD-010 - Task Dispatching Demo/TAD-010 - Task Dispatching Demo.miz b/Moose Test Missions/TAD - Task Dispatching/TAD-010 - Task Dispatching Demo/TAD-010 - Task Dispatching Demo.miz index 91669ff65..0d5f4a7cc 100644 Binary files a/Moose Test Missions/TAD - Task Dispatching/TAD-010 - Task Dispatching Demo/TAD-010 - Task Dispatching Demo.miz and b/Moose Test Missions/TAD - Task Dispatching/TAD-010 - Task Dispatching Demo/TAD-010 - Task Dispatching Demo.miz differ diff --git a/Moose Test Missions/TSK - Task Modelling/TSK-010 - Task Modelling - SEAD/TSK-010 - Task Modelling - SEAD.miz b/Moose Test Missions/TSK - Task Modelling/TSK-010 - Task Modelling - SEAD/TSK-010 - Task Modelling - SEAD.miz index 1b3d36c4a..f1da5287b 100644 Binary files a/Moose Test Missions/TSK - Task Modelling/TSK-010 - Task Modelling - SEAD/TSK-010 - Task Modelling - SEAD.miz and b/Moose Test Missions/TSK - Task Modelling/TSK-010 - Task Modelling - SEAD/TSK-010 - Task Modelling - SEAD.miz differ diff --git a/Moose Test Missions/TSK - Task Modelling/TSK-020 - Task Modelling - Pickup/TSK-020 - Task Modelling - Pickup.miz b/Moose Test Missions/TSK - Task Modelling/TSK-020 - Task Modelling - Pickup/TSK-020 - Task Modelling - Pickup.miz index 7a8b7692d..76c709d0b 100644 Binary files a/Moose Test Missions/TSK - Task Modelling/TSK-020 - Task Modelling - Pickup/TSK-020 - Task Modelling - Pickup.miz and b/Moose Test Missions/TSK - Task Modelling/TSK-020 - Task Modelling - Pickup/TSK-020 - Task Modelling - Pickup.miz differ diff --git a/Moose Test Missions/ZON - Zones/ZON-100 - Normal Zone/ZON-100 - Normal Zone.miz b/Moose Test Missions/ZON - Zones/ZON-100 - Normal Zone/ZON-100 - Normal Zone.miz index e1e737483..bc0246b3d 100644 Binary files a/Moose Test Missions/ZON - Zones/ZON-100 - Normal Zone/ZON-100 - Normal Zone.miz and b/Moose Test Missions/ZON - Zones/ZON-100 - Normal Zone/ZON-100 - Normal Zone.miz differ diff --git a/Moose Test Missions/ZON - Zones/ZON-200 - Group Zone/ZON-200 - Group Zone.miz b/Moose Test Missions/ZON - Zones/ZON-200 - Group Zone/ZON-200 - Group Zone.miz index ee13b09d3..0af0a21e4 100644 Binary files a/Moose Test Missions/ZON - Zones/ZON-200 - Group Zone/ZON-200 - Group Zone.miz and b/Moose Test Missions/ZON - Zones/ZON-200 - Group Zone/ZON-200 - Group Zone.miz differ diff --git a/Moose Test Missions/ZON - Zones/ZON-300 - Unit Zone/ZON-300 - Unit Zone.miz b/Moose Test Missions/ZON - Zones/ZON-300 - Unit Zone/ZON-300 - Unit Zone.miz index 92133f436..7b0cf0758 100644 Binary files a/Moose Test Missions/ZON - Zones/ZON-300 - Unit Zone/ZON-300 - Unit Zone.miz and b/Moose Test Missions/ZON - Zones/ZON-300 - Unit Zone/ZON-300 - Unit Zone.miz differ diff --git a/Moose Test Missions/ZON - Zones/ZON-400 - Radius Zone/ZON-400 - Radius Zone.miz b/Moose Test Missions/ZON - Zones/ZON-400 - Radius Zone/ZON-400 - Radius Zone.miz index 614c1b017..28a664c8e 100644 Binary files a/Moose Test Missions/ZON - Zones/ZON-400 - Radius Zone/ZON-400 - Radius Zone.miz and b/Moose Test Missions/ZON - Zones/ZON-400 - Radius Zone/ZON-400 - Radius Zone.miz differ diff --git a/Moose Test Missions/ZON - Zones/ZON-500 - Polygon Zone/ZON-500 - Polygon Zone.miz b/Moose Test Missions/ZON - Zones/ZON-500 - Polygon Zone/ZON-500 - Polygon Zone.miz index ff9359079..d79a2c175 100644 Binary files a/Moose Test Missions/ZON - Zones/ZON-500 - Polygon Zone/ZON-500 - Polygon Zone.miz and b/Moose Test Missions/ZON - Zones/ZON-500 - Polygon Zone/ZON-500 - Polygon Zone.miz differ diff --git a/docs/Documentation/AI_Cap.html b/docs/Documentation/AI_Cap.html index a2f0778d5..5dbbfed57 100644 --- a/docs/Documentation/AI_Cap.html +++ b/docs/Documentation/AI_Cap.html @@ -86,7 +86,7 @@ and automatically engage any airborne enemies that are within a certain range or
The AICAPZONE is assigned a @(Group) and this must be done before the AICAPZONE process can be started using the Start event.
+The AICAPZONE is assigned a Group and this must be done before the AICAPZONE process can be started using the Start event.
Synchronous Event Trigger for Event Destroy.
-OnBefore Transition Handler for Event Fired.
-Synchronous Event Trigger for Event Destroy.
- - -Core.Event#EVENTDATA EventData :
The AICASZONE is assigned a @(Group) and this must be done before the AICASZONE process can be started through the Start event.
+The AICASZONE is assigned a Group and this must be done before the AICASZONE process can be started through the Start event.
Synchronous Event Trigger for Event Destroy.
-Synchronous Event Trigger for Event Destroy.
- - -The AIPATROLZONE is assigned a @(Group) and this must be done before the AIPATROLZONE process can be started using the Start event.
+The AIPATROLZONE is assigned a Group and this must be done before the AIPATROLZONE process can be started using the Start event.
Synchronous Event Trigger for Event Detect.
+OnBefore Transition Handler for Event Status.
+OnLeave Transition Handler for State Returning.
+Sets the floor and ceiling altitude of the patrol.
+Activate the detection.
+Deactivate the detection.
Sets (modifies) the minimum and maximum speed of the patrol.
+Set the status checking off.
Asynchronous Event Trigger for Event Status.
+Synchronous Event Trigger for Event Detect.
+ + +Core.Event#EVENTDATA EventData :
Core.Event#EVENTDATA EventData :
#boolean: Return false to cancel Transition.
+Core.Event#EVENTDATA EventData :
Activate the detection.
+ + +The AI will detect for targets if the Detection is switched On.
+ +#AIPATROLZONE: +self
+ +Deactivate the detection.
+ + +The AI will NOT detect for targets.
+ +#AIPATROLZONE: +self
+ +Set the status checking off.
+ +#AIPATROLZONE: +self
+ +(GROUND) Fire at a VEC2 point until ammunition is finished.
Dcs.DCSTypes#Distance Radius :
The radius of the zone to deploy the fire at.
#number AmmoCount :
+(optional) Quantity of ammunition to expand (omit to fire until ammunition is depleted).
Flag that indicates if all the Groups of the SpawnGroup need to be visible when Spawned.
+When the first Spawn executes, all the Groups need to be made visible before start.