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 @@ -- -- ![Process](..\Presentations\AI_Cap\Dia3.JPG) -- --- 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. -- -- ![Process](..\Presentations\AI_Cap\Dia4.JPG) -- @@ -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 @@ -- -- ![HoldAndEngage](..\Presentations\AI_Cas\Dia3.JPG) -- --- 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. -- -- ![Start Event](..\Presentations\AI_Cas\Dia4.JPG) -- @@ -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 @@ -- -- ![Process](..\Presentations\AI_Patrol\Dia3.JPG) -- --- 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. -- -- ![Process](..\Presentations\AI_Patrol\Dia4.JPG) -- @@ -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 -- -- ![Process](..\Presentations\AI_Patrol\Dia3.JPG) -- --- 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. -- -- ![Process](..\Presentations\AI_Patrol\Dia4.JPG) -- @@ -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.** -- -- ![Banner Image](..\Presentations\AI_Cas\Dia1.JPG) @@ -25473,7 +25570,7 @@ end -- -- ![HoldAndEngage](..\Presentations\AI_Cas\Dia3.JPG) -- --- 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. -- -- ![Start Event](..\Presentations\AI_Cas\Dia4.JPG) -- @@ -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 -- -- ![Process](..\Presentations\AI_Cap\Dia3.JPG) -- --- 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. -- -- ![Process](..\Presentations\AI_Cap\Dia4.JPG) -- @@ -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 -- -- ![Process](..\Presentations\AI_Patrol\Dia3.JPG) -- --- 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. -- -- ![Process](..\Presentations\AI_Patrol\Dia4.JPG) -- @@ -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.** -- -- ![Banner Image](..\Presentations\AI_Cas\Dia1.JPG) @@ -25483,7 +25570,7 @@ end -- -- ![HoldAndEngage](..\Presentations\AI_Cas\Dia3.JPG) -- --- 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. -- -- ![Start Event](..\Presentations\AI_Cas\Dia4.JPG) -- @@ -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 -- -- ![Process](..\Presentations\AI_Cap\Dia3.JPG) -- --- 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. -- -- ![Process](..\Presentations\AI_Cap\Dia4.JPG) -- @@ -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

Process

-

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.

Process

@@ -186,6 +186,8 @@ Use the method AI.AICa
  • Quax: Concept, Advice & Testing.
  • Pikey: Concept, Advice & Testing.
  • Gunterlund: Test case revision.
  • +
  • **Whisper: Testing.
  • +
  • **Delta99: Testing.
  • Authors:

    @@ -246,12 +248,6 @@ Use the method AI.AICa AI_CAP_ZONE:Destroy()

    Synchronous Event Trigger for Event Destroy.

    - - - - AI_CAP_ZONE.DetectUnits - - @@ -348,12 +344,6 @@ Use the method AI.AICa AI_CAP_ZONE:OnBeforeFired(Controllable, From, Event, To)

    OnBefore Transition Handler for Event Fired.

    - - - - AI_CAP_ZONE:OnDead(EventData) - - @@ -576,20 +566,6 @@ Use the method AI.AICa

    Synchronous Event Trigger for Event Destroy.

    - - -
    -
    - - #boolean - -AI_CAP_ZONE.DetectUnits - -
    -
    - - -
    @@ -1139,27 +1115,6 @@ Return false to cancel Transition.

    - -AI_CAP_ZONE:OnDead(EventData) - -
    -
    - - - -

    Parameter

    - -
    -
    -
    -
    - AI_CAP_ZONE:OnEnterEngaging(Controllable, From, Event, To) diff --git a/docs/Documentation/AI_Cas.html b/docs/Documentation/AI_Cas.html index 7bf994b13..a61bd6217 100644 --- a/docs/Documentation/AI_Cas.html +++ b/docs/Documentation/AI_Cas.html @@ -88,7 +88,7 @@ The AICASZONE runs a process. It holds an AI in a Patrol Zone and when

    HoldAndEngage

    -

    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.

    Start Event

    @@ -255,12 +255,6 @@ It can be notified to go RTB through the RTB event.

    AI_CAS_ZONE:Destroy()

    Synchronous Event Trigger for Event Destroy.

    - - - - AI_CAS_ZONE.DetectUnits - - @@ -561,20 +555,6 @@ It can be notified to go RTB through the RTB event.

    Synchronous Event Trigger for Event Destroy.

    - -
    -
    -
    - - #boolean - -AI_CAS_ZONE.DetectUnits - -
    -
    - - -
    diff --git a/docs/Documentation/AI_Patrol.html b/docs/Documentation/AI_Patrol.html index 78927fa78..6ef82cd23 100644 --- a/docs/Documentation/AI_Patrol.html +++ b/docs/Documentation/AI_Patrol.html @@ -85,7 +85,7 @@

    Process

    -

    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.

    Process

    @@ -276,6 +276,12 @@ Use the method AIPATROLZONE.M AI_PATROL_ZONE:Detect()

    Synchronous Event Trigger for Event Detect.

    + + + + AI_PATROL_ZONE.DetectActivated + + @@ -285,7 +291,7 @@ Use the method AIPATROLZONE.M - AI_PATROL_ZONE.DetectUnits + AI_PATROL_ZONE.DetectOn @@ -402,6 +408,18 @@ Use the method AIPATROLZONE.M AI_PATROL_ZONE:OnBeforeStatus(Controllable, From, Event, To)

    OnBefore Transition Handler for Event Status.

    + + + + AI_PATROL_ZONE:OnCrash(EventData) + + + + + + AI_PATROL_ZONE:OnEjection(EventData) + + @@ -426,6 +444,12 @@ Use the method AIPATROLZONE.M AI_PATROL_ZONE:OnLeaveReturning(Controllable, From, Event, To)

    OnLeave Transition Handler for State Returning.

    + + + + AI_PATROL_ZONE:OnPilotDead(EventData) + + @@ -504,6 +528,18 @@ Use the method AIPATROLZONE.M AI_PATROL_ZONE:SetAltitude(PatrolFloorAltitude, PatrolCeilingAltitude)

    Sets the floor and ceiling altitude of the patrol.

    + + + + AI_PATROL_ZONE:SetDetectionActivated() + +

    Activate the detection.

    + + + + AI_PATROL_ZONE:SetDetectionDeactivated() + +

    Deactivate the detection.

    @@ -534,6 +570,12 @@ Use the method AIPATROLZONE.M AI_PATROL_ZONE:SetSpeed(PatrolMinSpeed, PatrolMaxSpeed)

    Sets (modifies) the minimum and maximum speed of the patrol.

    + + + + AI_PATROL_ZONE:SetStatusOff() + +

    Set the status checking off.

    @@ -588,6 +630,12 @@ Use the method AIPATROLZONE.M AI_PATROL_ZONE:__Status(Delay)

    Asynchronous Event Trigger for Event Status.

    + + + + AI_PATROL_ZONE:onafterDead() + + @@ -723,6 +771,20 @@ Use the method AIPATROLZONE.M

    Synchronous Event Trigger for Event Detect.

    + +
    +
    +
    + + #boolean + +AI_PATROL_ZONE.DetectActivated + +
    +
    + + +
    @@ -743,8 +805,8 @@ Use the method AIPATROLZONE.M
    #boolean - -AI_PATROL_ZONE.DetectUnits + +AI_PATROL_ZONE.DetectOn
    @@ -1461,6 +1523,48 @@ Return false to cancel Transition.

    + +AI_PATROL_ZONE:OnCrash(EventData) + +
    +
    + + + +

    Parameter

    + +
    +
    +
    +
    + + +AI_PATROL_ZONE:OnEjection(EventData) + +
    +
    + + + +

    Parameter

    + +
    +
    +
    +
    + AI_PATROL_ZONE:OnEnterPatrolling(Controllable, From, Event, To) @@ -1626,6 +1730,27 @@ The To State string.

    #boolean: Return false to cancel Transition.

    +
    +
    +
    +
    + + +AI_PATROL_ZONE:OnPilotDead(EventData) + +
    +
    + + + +

    Parameter

    +
    @@ -1830,6 +1955,48 @@ self

    + +AI_PATROL_ZONE:SetDetectionActivated() + +
    +
    + +

    Activate the detection.

    + + +

    The AI will detect for targets if the Detection is switched On.

    + +

    Return value

    + +

    #AIPATROLZONE: +self

    + +
    +
    +
    +
    + + +AI_PATROL_ZONE:SetDetectionDeactivated() + +
    +
    + +

    Deactivate the detection.

    + + +

    The AI will NOT detect for targets.

    + +

    Return value

    + +

    #AIPATROLZONE: +self

    + +
    +
    +
    +
    + AI_PATROL_ZONE:SetDetectionInterval(Seconds) @@ -1966,6 +2133,24 @@ self

    + +AI_PATROL_ZONE:SetStatusOff() + +
    +
    + +

    Set the status checking off.

    + +

    Return value

    + +

    #AIPATROLZONE: +self

    + +
    +
    +
    +
    + AI_PATROL_ZONE:Start() @@ -2147,6 +2332,19 @@ The delay in seconds.

    + +
    +
    +
    + + +AI_PATROL_ZONE:onafterDead() + +
    +
    + + +
    diff --git a/docs/Documentation/Controllable.html b/docs/Documentation/Controllable.html index 969c41968..f631f02e5 100644 --- a/docs/Documentation/Controllable.html +++ b/docs/Documentation/Controllable.html @@ -115,7 +115,7 @@ This is different from the EnRoute tasks, where the targets of the task need to
  • 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.
  • @@ -568,7 +568,7 @@ A speed can be given in km/h.

    - CONTROLLABLE:TaskFireAtPoint(Vec2, Radius) + CONTROLLABLE:TaskFireAtPoint(Vec2, Radius, AmmoCount)

    (GROUND) Fire at a VEC2 point until ammunition is finished.

    @@ -2504,7 +2504,7 @@ The DCS task structure.

    -CONTROLLABLE:TaskFireAtPoint(Vec2, Radius) +CONTROLLABLE:TaskFireAtPoint(Vec2, Radius, AmmoCount)
    @@ -2524,6 +2524,12 @@ The point to fire at.

    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).

    +
  • Return value

    diff --git a/docs/Documentation/Spawn.html b/docs/Documentation/Spawn.html index 846a7ceb0..24231797c 100644 --- a/docs/Documentation/Spawn.html +++ b/docs/Documentation/Spawn.html @@ -2491,7 +2491,7 @@ Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):Schedule( 600, 0.5 ) -

    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.

    diff --git a/docs/README.md b/docs/README.md index 965f165f0..f57b7b8c5 100644 --- a/docs/README.md +++ b/docs/README.md @@ -193,15 +193,6 @@ For example, for the SEAD Task, the task action flow combines the actions ASSIGN * [ACT_ASSIST](Documentation/Assist.html): Mechanisms to assist players executing a task. For example, acquire targets through smoking them. -# MOOSE Tutorials and Examples - -You can download [test missions](https://github.com/FlightControl-Master/MOOSE/tree/master/Test%20Missions) to have examples and learn the syntax and usage of the MOOSE classes. - -There are [Video Tutorials](https://www.youtube.com/channel/UCjrA9j5LQoWsG4SpS8i79Qg) on my YOUTUBE channel on which you can learn some coding aspects with mission execution demos, as well as some of the tooling and internal mechanisms within MOOSE. - - -In the triggers section, there is a flag (9999) that will decide how MOOSE will be loaded. When flag 9999 is set, MOOSE will be dynamically loaded. When flag 9999 is off, MOOSE will be loaded embedded. Note that when loaded embedded, **your mission must include the last Moose_Embedded.lua file**. So, ensure that the last file is included in the DO SCRIPT section when MOOSE got an update! - # Credits Note that the framework is based on code i've written myself, but some of it is also based on code that i've seen as great scripting code and ideas, and which i've revised. I see this framework evolving towards a broader public, and the ownership may dissapear (or parts of it). Consider this code public domain. Therefore a list of credits to all who have or are contributing (this list will increase over time): Grimes, Prof_Hilactic, xcom, the 476 virtual squadron team, ... @@ -223,8 +214,8 @@ Working together with James has resulted in the creation of the AIBALANCER class **Stuka (Danny)** Working together with Danny has resulted in the MISSILETRAINER class. Stuka has shared his ideas and together we made a design. Together with the 476 virtual team, we tested this CLASS, and got much positive feedback! -**Mechanic (G�bor)** -Worked together with G�bor to create the concept of the DETECTION and FAC classes. Mechanic shared his ideas and concepts to group detected targets into sets within detection zones... Will continue to work with G�bor to workout the DETECTION and FAC classes. +**Mechanic (Gabor)** +Worked together with Gabor to create the concept of the DETECTION and FAC classes. Mechanic shared his ideas and concepts to group detected targets into sets within detection zones... Will continue to work with G�bor to workout the DETECTION and FAC classes. **Shadoh** Interacted on the eagle dynamics forum to build the FOLLOW class to build large WWII airplane formations.