mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Merge pull request #308 from FlightControl-Master/master-bugfix-ai-cas-cap-abort
Fixed abort in AI_CAP_ZONE and CAI_CAS_ZONE
This commit is contained in:
commit
8c8e95d8fb
@ -54,12 +54,15 @@
|
||||
--
|
||||
-- ### 1.2.2) AI_CAP_ZONE Events
|
||||
--
|
||||
-- * **Start** ( Group ): Start the process.
|
||||
-- * **Route** ( Group ): Route the AI to a new random 3D point within the Patrol Zone.
|
||||
-- * **Engage** ( Group ): Let the AI engage the bogeys.
|
||||
-- * **RTB** ( Group ): Route the AI to the home base.
|
||||
-- * **Detect** ( Group ): The AI is detecting targets.
|
||||
-- * **Detected** ( Group ): The AI has detected new targets.
|
||||
-- * **@{AI_Patrol#AI_PATROL_ZONE.Start}**: Start the process.
|
||||
-- * **@{AI_Patrol#AI_PATROL_ZONE.Route}**: Route the AI to a new random 3D point within the Patrol Zone.
|
||||
-- * **@{#AI_CAP_ZONE.Engage}**: Let the AI engage the bogeys.
|
||||
-- * **@{#AI_CAP_ZONE.Abort}**: Aborts the engagement and return patrolling in the patrol zone.
|
||||
-- * **@{AI_Patrol#AI_PATROL_ZONE.RTB}**: Route the AI to the home base.
|
||||
-- * **@{AI_Patrol#AI_PATROL_ZONE.Detect}**: The AI is detecting targets.
|
||||
-- * **@{AI_Patrol#AI_PATROL_ZONE.Detected}**: The AI has detected new targets.
|
||||
-- * **@{#AI_CAP_ZONE.Destroy}**: The AI has destroyed a bogey @{Unit}.
|
||||
-- * **@{#AI_CAP_ZONE.Destroyed}**: The AI has destroyed all bogeys @{Unit}s assigned in the CAS task.
|
||||
-- * **Status** ( Group ): The AI is checking status (fuel and damage). When the tresholds have been reached, the AI will RTB.
|
||||
--
|
||||
-- ## 1.3) Set the Range of Engagement
|
||||
@ -395,6 +398,18 @@ function AI_CAP_ZONE:onafterDetected( Controllable, From, Event, To )
|
||||
end
|
||||
|
||||
|
||||
--- @param #AI_CAP_ZONE self
|
||||
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
|
||||
-- @param #string From The From State string.
|
||||
-- @param #string Event The Event string.
|
||||
-- @param #string To The To State string.
|
||||
function AI_CAP_ZONE:onafterAbort( Controllable, From, Event, To )
|
||||
Controllable:ClearTasks()
|
||||
self:__Route( 1 )
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
--- @param #AI_CAP_ZONE self
|
||||
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
|
||||
|
||||
@ -83,6 +83,7 @@
|
||||
-- * **@{AI_Patrol#AI_PATROL_ZONE.Start}**: Start the process.
|
||||
-- * **@{AI_Patrol#AI_PATROL_ZONE.Route}**: Route the AI to a new random 3D point within the Patrol Zone.
|
||||
-- * **@{#AI_CAS_ZONE.Engage}**: Engage the AI to provide CAS in the Engage Zone, destroying any target it finds.
|
||||
-- * **@{#AI_CAS_ZONE.Abort}**: Aborts the engagement and return patrolling in the patrol zone.
|
||||
-- * **@{AI_Patrol#AI_PATROL_ZONE.RTB}**: Route the AI to the home base.
|
||||
-- * **@{AI_Patrol#AI_PATROL_ZONE.Detect}**: The AI is detecting targets.
|
||||
-- * **@{AI_Patrol#AI_PATROL_ZONE.Detected}**: The AI has detected new targets.
|
||||
@ -421,6 +422,15 @@ function AI_CAS_ZONE:onafterTarget( Controllable, From, Event, To )
|
||||
end
|
||||
|
||||
|
||||
--- @param #AI_CAS_ZONE self
|
||||
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
|
||||
-- @param #string From The From State string.
|
||||
-- @param #string Event The Event string.
|
||||
-- @param #string To The To State string.
|
||||
function AI_CAS_ZONE:onafterAbort( Controllable, From, Event, To )
|
||||
Controllable:ClearTasks()
|
||||
self:__Route( 1 )
|
||||
end
|
||||
|
||||
--- @param #AI_CAS_ZONE self
|
||||
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
|
||||
|
||||
@ -222,6 +222,24 @@ end
|
||||
|
||||
-- Tasks
|
||||
|
||||
--- Clear all tasks from the controllable.
|
||||
-- @param #CONTROLLABLE self
|
||||
-- @return #CONTROLLABLE
|
||||
function CONTROLLABLE:ClearTasks()
|
||||
self:F2()
|
||||
|
||||
local DCSControllable = self:GetDCSObject()
|
||||
|
||||
if DCSControllable then
|
||||
local Controller = self:_GetController()
|
||||
Controller:resetTask()
|
||||
return self
|
||||
end
|
||||
|
||||
return nil
|
||||
end
|
||||
|
||||
|
||||
--- Popping current Task from the controllable.
|
||||
-- @param #CONTROLLABLE self
|
||||
-- @return Wrapper.Controllable#CONTROLLABLE self
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
env.info( '*** MOOSE STATIC INCLUDE START *** ' )
|
||||
env.info( 'Moose Generation Timestamp: 20170314_0536' )
|
||||
env.info( 'Moose Generation Timestamp: 20170314_0643' )
|
||||
local base = _G
|
||||
|
||||
Include = {}
|
||||
@ -13671,6 +13671,24 @@ end
|
||||
|
||||
-- Tasks
|
||||
|
||||
--- Clear all tasks from the controllable.
|
||||
-- @param #CONTROLLABLE self
|
||||
-- @return #CONTROLLABLE
|
||||
function CONTROLLABLE:ClearTasks()
|
||||
self:F2()
|
||||
|
||||
local DCSControllable = self:GetDCSObject()
|
||||
|
||||
if DCSControllable then
|
||||
local Controller = self:_GetController()
|
||||
Controller:resetTask()
|
||||
return self
|
||||
end
|
||||
|
||||
return nil
|
||||
end
|
||||
|
||||
|
||||
--- Popping current Task from the controllable.
|
||||
-- @param #CONTROLLABLE self
|
||||
-- @return Wrapper.Controllable#CONTROLLABLE self
|
||||
@ -27682,6 +27700,7 @@ end
|
||||
-- * **@{AI_Patrol#AI_PATROL_ZONE.Start}**: Start the process.
|
||||
-- * **@{AI_Patrol#AI_PATROL_ZONE.Route}**: Route the AI to a new random 3D point within the Patrol Zone.
|
||||
-- * **@{#AI_CAS_ZONE.Engage}**: Engage the AI to provide CAS in the Engage Zone, destroying any target it finds.
|
||||
-- * **@{#AI_CAS_ZONE.Abort}**: Aborts the engagement and return patrolling in the patrol zone.
|
||||
-- * **@{AI_Patrol#AI_PATROL_ZONE.RTB}**: Route the AI to the home base.
|
||||
-- * **@{AI_Patrol#AI_PATROL_ZONE.Detect}**: The AI is detecting targets.
|
||||
-- * **@{AI_Patrol#AI_PATROL_ZONE.Detected}**: The AI has detected new targets.
|
||||
@ -28020,6 +28039,15 @@ function AI_CAS_ZONE:onafterTarget( Controllable, From, Event, To )
|
||||
end
|
||||
|
||||
|
||||
--- @param #AI_CAS_ZONE self
|
||||
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
|
||||
-- @param #string From The From State string.
|
||||
-- @param #string Event The Event string.
|
||||
-- @param #string To The To State string.
|
||||
function AI_CAS_ZONE:onafterAbort( Controllable, From, Event, To )
|
||||
Controllable:ClearTasks()
|
||||
self:__Route( 1 )
|
||||
end
|
||||
|
||||
--- @param #AI_CAS_ZONE self
|
||||
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
|
||||
@ -28240,12 +28268,15 @@ end
|
||||
--
|
||||
-- ### 1.2.2) AI_CAP_ZONE Events
|
||||
--
|
||||
-- * **Start** ( Group ): Start the process.
|
||||
-- * **Route** ( Group ): Route the AI to a new random 3D point within the Patrol Zone.
|
||||
-- * **Engage** ( Group ): Let the AI engage the bogeys.
|
||||
-- * **RTB** ( Group ): Route the AI to the home base.
|
||||
-- * **Detect** ( Group ): The AI is detecting targets.
|
||||
-- * **Detected** ( Group ): The AI has detected new targets.
|
||||
-- * **@{AI_Patrol#AI_PATROL_ZONE.Start}**: Start the process.
|
||||
-- * **@{AI_Patrol#AI_PATROL_ZONE.Route}**: Route the AI to a new random 3D point within the Patrol Zone.
|
||||
-- * **@{#AI_CAP_ZONE.Engage}**: Let the AI engage the bogeys.
|
||||
-- * **@{#AI_CAP_ZONE.Abort}**: Aborts the engagement and return patrolling in the patrol zone.
|
||||
-- * **@{AI_Patrol#AI_PATROL_ZONE.RTB}**: Route the AI to the home base.
|
||||
-- * **@{AI_Patrol#AI_PATROL_ZONE.Detect}**: The AI is detecting targets.
|
||||
-- * **@{AI_Patrol#AI_PATROL_ZONE.Detected}**: The AI has detected new targets.
|
||||
-- * **@{#AI_CAP_ZONE.Destroy}**: The AI has destroyed a bogey @{Unit}.
|
||||
-- * **@{#AI_CAP_ZONE.Destroyed}**: The AI has destroyed all bogeys @{Unit}s assigned in the CAS task.
|
||||
-- * **Status** ( Group ): The AI is checking status (fuel and damage). When the tresholds have been reached, the AI will RTB.
|
||||
--
|
||||
-- ## 1.3) Set the Range of Engagement
|
||||
@ -28581,6 +28612,18 @@ function AI_CAP_ZONE:onafterDetected( Controllable, From, Event, To )
|
||||
end
|
||||
|
||||
|
||||
--- @param #AI_CAP_ZONE self
|
||||
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
|
||||
-- @param #string From The From State string.
|
||||
-- @param #string Event The Event string.
|
||||
-- @param #string To The To State string.
|
||||
function AI_CAP_ZONE:onafterAbort( Controllable, From, Event, To )
|
||||
Controllable:ClearTasks()
|
||||
self:__Route( 1 )
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
--- @param #AI_CAP_ZONE self
|
||||
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
env.info( '*** MOOSE STATIC INCLUDE START *** ' )
|
||||
env.info( 'Moose Generation Timestamp: 20170314_0536' )
|
||||
env.info( 'Moose Generation Timestamp: 20170314_0643' )
|
||||
local base = _G
|
||||
|
||||
Include = {}
|
||||
@ -13671,6 +13671,24 @@ end
|
||||
|
||||
-- Tasks
|
||||
|
||||
--- Clear all tasks from the controllable.
|
||||
-- @param #CONTROLLABLE self
|
||||
-- @return #CONTROLLABLE
|
||||
function CONTROLLABLE:ClearTasks()
|
||||
self:F2()
|
||||
|
||||
local DCSControllable = self:GetDCSObject()
|
||||
|
||||
if DCSControllable then
|
||||
local Controller = self:_GetController()
|
||||
Controller:resetTask()
|
||||
return self
|
||||
end
|
||||
|
||||
return nil
|
||||
end
|
||||
|
||||
|
||||
--- Popping current Task from the controllable.
|
||||
-- @param #CONTROLLABLE self
|
||||
-- @return Wrapper.Controllable#CONTROLLABLE self
|
||||
@ -27682,6 +27700,7 @@ end
|
||||
-- * **@{AI_Patrol#AI_PATROL_ZONE.Start}**: Start the process.
|
||||
-- * **@{AI_Patrol#AI_PATROL_ZONE.Route}**: Route the AI to a new random 3D point within the Patrol Zone.
|
||||
-- * **@{#AI_CAS_ZONE.Engage}**: Engage the AI to provide CAS in the Engage Zone, destroying any target it finds.
|
||||
-- * **@{#AI_CAS_ZONE.Abort}**: Aborts the engagement and return patrolling in the patrol zone.
|
||||
-- * **@{AI_Patrol#AI_PATROL_ZONE.RTB}**: Route the AI to the home base.
|
||||
-- * **@{AI_Patrol#AI_PATROL_ZONE.Detect}**: The AI is detecting targets.
|
||||
-- * **@{AI_Patrol#AI_PATROL_ZONE.Detected}**: The AI has detected new targets.
|
||||
@ -28020,6 +28039,15 @@ function AI_CAS_ZONE:onafterTarget( Controllable, From, Event, To )
|
||||
end
|
||||
|
||||
|
||||
--- @param #AI_CAS_ZONE self
|
||||
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
|
||||
-- @param #string From The From State string.
|
||||
-- @param #string Event The Event string.
|
||||
-- @param #string To The To State string.
|
||||
function AI_CAS_ZONE:onafterAbort( Controllable, From, Event, To )
|
||||
Controllable:ClearTasks()
|
||||
self:__Route( 1 )
|
||||
end
|
||||
|
||||
--- @param #AI_CAS_ZONE self
|
||||
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
|
||||
@ -28240,12 +28268,15 @@ end
|
||||
--
|
||||
-- ### 1.2.2) AI_CAP_ZONE Events
|
||||
--
|
||||
-- * **Start** ( Group ): Start the process.
|
||||
-- * **Route** ( Group ): Route the AI to a new random 3D point within the Patrol Zone.
|
||||
-- * **Engage** ( Group ): Let the AI engage the bogeys.
|
||||
-- * **RTB** ( Group ): Route the AI to the home base.
|
||||
-- * **Detect** ( Group ): The AI is detecting targets.
|
||||
-- * **Detected** ( Group ): The AI has detected new targets.
|
||||
-- * **@{AI_Patrol#AI_PATROL_ZONE.Start}**: Start the process.
|
||||
-- * **@{AI_Patrol#AI_PATROL_ZONE.Route}**: Route the AI to a new random 3D point within the Patrol Zone.
|
||||
-- * **@{#AI_CAP_ZONE.Engage}**: Let the AI engage the bogeys.
|
||||
-- * **@{#AI_CAP_ZONE.Abort}**: Aborts the engagement and return patrolling in the patrol zone.
|
||||
-- * **@{AI_Patrol#AI_PATROL_ZONE.RTB}**: Route the AI to the home base.
|
||||
-- * **@{AI_Patrol#AI_PATROL_ZONE.Detect}**: The AI is detecting targets.
|
||||
-- * **@{AI_Patrol#AI_PATROL_ZONE.Detected}**: The AI has detected new targets.
|
||||
-- * **@{#AI_CAP_ZONE.Destroy}**: The AI has destroyed a bogey @{Unit}.
|
||||
-- * **@{#AI_CAP_ZONE.Destroyed}**: The AI has destroyed all bogeys @{Unit}s assigned in the CAS task.
|
||||
-- * **Status** ( Group ): The AI is checking status (fuel and damage). When the tresholds have been reached, the AI will RTB.
|
||||
--
|
||||
-- ## 1.3) Set the Range of Engagement
|
||||
@ -28581,6 +28612,18 @@ function AI_CAP_ZONE:onafterDetected( Controllable, From, Event, To )
|
||||
end
|
||||
|
||||
|
||||
--- @param #AI_CAP_ZONE self
|
||||
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
|
||||
-- @param #string From The From State string.
|
||||
-- @param #string Event The Event string.
|
||||
-- @param #string To The To State string.
|
||||
function AI_CAP_ZONE:onafterAbort( Controllable, From, Event, To )
|
||||
Controllable:ClearTasks()
|
||||
self:__Route( 1 )
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
--- @param #AI_CAP_ZONE self
|
||||
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The Controllable Object managed by the FSM.
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,42 @@
|
||||
---
|
||||
-- Name: CAP-012 - CAP - Test Abort
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 14 Mar 2017
|
||||
--
|
||||
-- # Situation:
|
||||
--
|
||||
-- The Su-27 airplane will patrol in PatrolZone.
|
||||
-- It will engage when it detects the airplane and when the A-10C is within the CapEngageZone.
|
||||
-- It will abort the engagement after 1 minute and return to the patrol zone.
|
||||
--
|
||||
-- # Test cases:
|
||||
--
|
||||
-- 1. Observe the Su-27 patrolling.
|
||||
-- 2. Observe that, when the A-10C is within the engage zone, it will engage.
|
||||
-- 3. After engage, observe that the Su-27 returns to the PatrolZone.
|
||||
-- 4. When it engages, it will abort the engagement after 1 minute.
|
||||
|
||||
|
||||
local CapPlane = GROUP:FindByName( "Plane" )
|
||||
|
||||
local PatrolZone = ZONE:New( "Patrol Zone" )
|
||||
|
||||
local AICapZone = AI_CAP_ZONE:New( PatrolZone, 500, 1000, 500, 600 )
|
||||
|
||||
local EngageZoneGroup = GROUP:FindByName( "Engage Zone" )
|
||||
|
||||
local CapEngageZone = ZONE_POLYGON:New( "Engage Zone", EngageZoneGroup )
|
||||
|
||||
AICapZone:SetControllable( CapPlane )
|
||||
AICapZone:SetEngageZone( CapEngageZone ) -- Set the Engage Zone. The AI will only engage when the bogeys are within the CapEngageZone.
|
||||
|
||||
AICapZone:__Start( 1 ) -- They should statup, and start patrolling in the PatrolZone.
|
||||
|
||||
function AICapZone:OnAfterEngage(Controllable,From,Event,To)
|
||||
AICapZone:__Abort( 60 )
|
||||
end
|
||||
|
||||
function AICapZone:OnAfterAbort(Controllable,From,Event,To)
|
||||
BASE:E("MISSION ABORTED! Returning to Patrol Zone!")
|
||||
MESSAGE:New("MISSION ABORTED! Returning to Patrol Zone!",30,"ALERT!")
|
||||
end
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,81 @@
|
||||
---
|
||||
-- Name: CAS-004 - CAS in a Zone by Airplane Group - Test Abort
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 14 Mar 2017
|
||||
--
|
||||
-- # Situation:
|
||||
--
|
||||
-- A group of 4 Su-25T at patrolling north of an engage zone for 1 minute.
|
||||
-- After 10 minutes, the command center orders the Su-25T to engage the zone and execute a CAS.
|
||||
-- After 12 minutes, the mission is aborted.
|
||||
--
|
||||
-- # Test cases:
|
||||
--
|
||||
-- 1. Observe that the Su-25T is patrolling in the patrol zone, until the engage command is given.
|
||||
-- 2. The Su-25T are not detecting any target during the patrol.
|
||||
-- 3. When the Su-25T is commanded to engage, the group will fly to the engage zone
|
||||
-- 3.1. The approach speed to the engage zone is set to 350 km/h.
|
||||
-- 3.2. The altitude to the engage zone and CAS execution is set to 4000 meters.
|
||||
-- 4. Observe the mission being aborted. A message will be sent.
|
||||
-- 5. The Su-25T will go back patrolling.
|
||||
|
||||
|
||||
|
||||
-- Create a local variable (in this case called CASEngagementZone) and
|
||||
-- using the ZONE function find the pre-defined zone called "Engagement Zone"
|
||||
-- currently on the map and assign it to this variable
|
||||
local CASEngagementZone = ZONE:New( "Engagement Zone" )
|
||||
|
||||
-- Create a local variable (in this case called CASPlane) and
|
||||
-- using the GROUP function find the aircraft group called "Plane" and assign to this variable
|
||||
local CASPlane = GROUP:FindByName( "Plane" )
|
||||
|
||||
-- Create a local Variable (in this cased called PatrolZone and
|
||||
-- using the ZONE function find the pre-defined zone called "Patrol Zone" and assign it to this variable
|
||||
local PatrolZone = ZONE:New( "Patrol Zone" )
|
||||
|
||||
-- Create and object (in this case called AICasZone) and
|
||||
-- using the functions AI_CAS_ZONE assign the parameters that define this object
|
||||
-- (in this case PatrolZone, 500, 1000, 500, 600, CASEngagementZone)
|
||||
local AICasZone = AI_CAS_ZONE:New( PatrolZone, 500, 1000, 500, 600, CASEngagementZone )
|
||||
|
||||
-- Create an object (in this case called Targets) and
|
||||
-- using the GROUP function find the group labeled "Targets" and assign it to this object
|
||||
local Targets = GROUP:FindByName("Targets")
|
||||
|
||||
|
||||
-- Tell the program to use the object (in this case called CASPlane) as the group to use in the CAS function
|
||||
AICasZone:SetControllable( CASPlane )
|
||||
|
||||
-- Tell the group CASPlane to start the mission in 1 second.
|
||||
AICasZone:__Start( 1 ) -- They should statup, and start patrolling in the PatrolZone.
|
||||
|
||||
-- After 10 minutes, tell the group CASPlane to engage the targets located in the engagement zone called CASEngagement Zone. (600 is 600 seconds)
|
||||
AICasZone:__Engage( 600, 350, 4000 ) -- Engage after 10 minutes with a speed of 350 km/h and an altitude of 4000 meters.
|
||||
|
||||
-- After 12 minutes, tell the group CASPlane to abort the engagement.
|
||||
AICasZone:__Abort( 720 ) -- Abort the engagement.
|
||||
|
||||
-- Check every 60 seconds whether the Targets have been eliminated.
|
||||
-- When the trigger completed has been fired, the Plane will go back to the Patrol Zone.
|
||||
Check, CheckScheduleID = SCHEDULER:New(nil,
|
||||
function()
|
||||
if Targets:IsAlive() and Targets:GetSize() > 5 then
|
||||
BASE:E( "Test Mission: " .. Targets:GetSize() .. " targets left to be destroyed.")
|
||||
else
|
||||
BASE:E( "Test Mission: The required targets are destroyed." )
|
||||
AICasZone:__Accomplish( 1 ) -- Now they should fly back to teh patrolzone and patrol.
|
||||
end
|
||||
end, {}, 20, 60, 0.2 )
|
||||
|
||||
function AICasZone:OnAfterAbort(Controllable,From,Event,To)
|
||||
BASE:E( "MISSION ABORT! Back to patrol zone." )
|
||||
MESSAGE:New("Mission ABORTED! Back to the Patrol Zone!",30,"ALERT!"):ToAll()
|
||||
end
|
||||
|
||||
-- When the targets in the zone are destroyed, (see scheduled function), the planes will return home ...
|
||||
function AICasZone:OnAfterAccomplish( Controllable, From, Event, To )
|
||||
BASE:E( "Test Mission: Sending the Su-25T back to base." )
|
||||
Check:Stop( CheckScheduleID )
|
||||
AICasZone:__RTB( 1 )
|
||||
end
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -135,12 +135,15 @@ When the fuel treshold has been reached, the airplane will fly towards the neare
|
||||
<h3>1.2.2) AI<em>CAP</em>ZONE Events</h3>
|
||||
|
||||
<ul>
|
||||
<li><strong>Start</strong> ( Group ): Start the process.</li>
|
||||
<li><strong>Route</strong> ( Group ): Route the AI to a new random 3D point within the Patrol Zone.</li>
|
||||
<li><strong>Engage</strong> ( Group ): Let the AI engage the bogeys.</li>
|
||||
<li><strong>RTB</strong> ( Group ): Route the AI to the home base.</li>
|
||||
<li><strong>Detect</strong> ( Group ): The AI is detecting targets.</li>
|
||||
<li><strong>Detected</strong> ( Group ): The AI has detected new targets.</li>
|
||||
<li>**<a href="AI_Patrol.html##(AI_PATROL_ZONE).Start">AI<em>Patrol#AI</em>PATROL_ZONE.Start</a>**: Start the process.</li>
|
||||
<li>**<a href="AI_Patrol.html##(AI_PATROL_ZONE).Route">AI<em>Patrol#AI</em>PATROL_ZONE.Route</a>**: Route the AI to a new random 3D point within the Patrol Zone.</li>
|
||||
<li>**<a href="##(AI_CAP_ZONE).Engage">AI<em>CAP</em>ZONE.Engage</a>**: Let the AI engage the bogeys.</li>
|
||||
<li>**<a href="##(AI_CAP_ZONE).Abort">AI<em>CAP</em>ZONE.Abort</a>**: Aborts the engagement and return patrolling in the patrol zone.</li>
|
||||
<li>**<a href="AI_Patrol.html##(AI_PATROL_ZONE).RTB">AI<em>Patrol#AI</em>PATROL_ZONE.RTB</a>**: Route the AI to the home base.</li>
|
||||
<li>**<a href="AI_Patrol.html##(AI_PATROL_ZONE).Detect">AI<em>Patrol#AI</em>PATROL_ZONE.Detect</a>**: The AI is detecting targets.</li>
|
||||
<li>**<a href="AI_Patrol.html##(AI_PATROL_ZONE).Detected">AI<em>Patrol#AI</em>PATROL_ZONE.Detected</a>**: The AI has detected new targets.</li>
|
||||
<li>**<a href="##(AI_CAP_ZONE).Destroy">AI<em>CAP</em>ZONE.Destroy</a>**: The AI has destroyed a bogey <a href="Unit.html">Unit</a>.</li>
|
||||
<li>**<a href="##(AI_CAP_ZONE).Destroyed">AI<em>CAP</em>ZONE.Destroyed</a>**: The AI has destroyed all bogeys <a href="Unit.html">Unit</a>s assigned in the CAS task.</li>
|
||||
<li><strong>Status</strong> ( Group ): The AI is checking status (fuel and damage). When the tresholds have been reached, the AI will RTB.</li>
|
||||
</ul>
|
||||
|
||||
@ -411,6 +414,12 @@ Use the method <a href="AI_Cap.html##(AI_CAP_ZONE).SetEngageZone">AI<em>Cap#AI</
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_CAP_ZONE).__Fired">AI_CAP_ZONE:__Fired(Delay)</a></td>
|
||||
<td class="summary">
|
||||
<p>Asynchronous Event Trigger for Event Fired.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_CAP_ZONE).onafterAbort">AI_CAP_ZONE:onafterAbort(Controllable, From, Event, To)</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -1412,6 +1421,46 @@ The delay in seconds.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(AI_CAP_ZONE).onafterAbort" >
|
||||
<strong>AI_CAP_ZONE:onafterAbort(Controllable, From, Event, To)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="Wrapper.Controllable.html##(CONTROLLABLE)">Wrapper.Controllable#CONTROLLABLE</a> Controllable </em></code>:
|
||||
The Controllable Object managed by the FSM.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string From </em></code>:
|
||||
The From State string.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string Event </em></code>:
|
||||
The Event string.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string To </em></code>:
|
||||
The To State string.</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(AI_CAP_ZONE).onafterAccomplish" >
|
||||
<strong>AI_CAP_ZONE:onafterAccomplish(Controllable, From, Event, To)</strong>
|
||||
</a>
|
||||
|
||||
@ -166,6 +166,7 @@ It can be notified to go RTB through the <strong>RTB</strong> event.</p>
|
||||
<li>**<a href="AI_Patrol.html##(AI_PATROL_ZONE).Start">AI<em>Patrol#AI</em>PATROL_ZONE.Start</a>**: Start the process.</li>
|
||||
<li>**<a href="AI_Patrol.html##(AI_PATROL_ZONE).Route">AI<em>Patrol#AI</em>PATROL_ZONE.Route</a>**: Route the AI to a new random 3D point within the Patrol Zone.</li>
|
||||
<li>**<a href="##(AI_CAS_ZONE).Engage">AI<em>CAS</em>ZONE.Engage</a>**: Engage the AI to provide CAS in the Engage Zone, destroying any target it finds.</li>
|
||||
<li>**<a href="##(AI_CAS_ZONE).Abort">AI<em>CAS</em>ZONE.Abort</a>**: Aborts the engagement and return patrolling in the patrol zone.</li>
|
||||
<li>**<a href="AI_Patrol.html##(AI_PATROL_ZONE).RTB">AI<em>Patrol#AI</em>PATROL_ZONE.RTB</a>**: Route the AI to the home base.</li>
|
||||
<li>**<a href="AI_Patrol.html##(AI_PATROL_ZONE).Detect">AI<em>Patrol#AI</em>PATROL_ZONE.Detect</a>**: The AI is detecting targets.</li>
|
||||
<li>**<a href="AI_Patrol.html##(AI_PATROL_ZONE).Detected">AI<em>Patrol#AI</em>PATROL_ZONE.Detected</a>**: The AI has detected new targets.</li>
|
||||
@ -433,6 +434,12 @@ It can be notified to go RTB through the <strong>RTB</strong> event.</p>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_CAS_ZONE).__Fired">AI_CAS_ZONE:__Fired(Delay)</a></td>
|
||||
<td class="summary">
|
||||
<p>Asynchronous Event Trigger for Event Fired.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(AI_CAS_ZONE).onafterAbort">AI_CAS_ZONE:onafterAbort(Controllable, From, Event, To)</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -1574,6 +1581,46 @@ The delay in seconds.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(AI_CAS_ZONE).onafterAbort" >
|
||||
<strong>AI_CAS_ZONE:onafterAbort(Controllable, From, Event, To)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="Wrapper.Controllable.html##(CONTROLLABLE)">Wrapper.Controllable#CONTROLLABLE</a> Controllable </em></code>:
|
||||
The Controllable Object managed by the FSM.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string From </em></code>:
|
||||
The From State string.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string Event </em></code>:
|
||||
The Event string.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string To </em></code>:
|
||||
The To State string.</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(AI_CAS_ZONE).onafterAccomplish" >
|
||||
<strong>AI_CAS_ZONE:onafterAccomplish(Controllable, From, Event, To)</strong>
|
||||
</a>
|
||||
|
||||
@ -2425,6 +2425,7 @@ The UNIT carrying the package.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(AI_CARGO_UNIT).CargoCarrier" >
|
||||
<strong>AI_CARGO_UNIT.CargoCarrier</strong>
|
||||
</a>
|
||||
|
||||
@ -230,6 +230,12 @@ This is different from the EnRoute tasks, where the targets of the task need to
|
||||
<td class="name" nowrap="nowrap"><a href="##(CONTROLLABLE).ClassName">CONTROLLABLE.ClassName</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(CONTROLLABLE).ClearTasks">CONTROLLABLE:ClearTasks()</a></td>
|
||||
<td class="summary">
|
||||
<p>Clear all tasks from the controllable.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -737,6 +743,24 @@ A speed can be given in km/h.</p>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(CONTROLLABLE).ClearTasks" >
|
||||
<strong>CONTROLLABLE:ClearTasks()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Clear all tasks from the controllable.</p>
|
||||
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(CONTROLLABLE)">#CONTROLLABLE</a>:</em></p>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
|
||||
@ -1346,7 +1346,6 @@ The new calculated POINT_VEC2.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(POINT_VEC2).z" >
|
||||
<strong>POINT_VEC2.z</strong>
|
||||
</a>
|
||||
|
||||
@ -2606,7 +2606,7 @@ Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):Schedule( 600, 0.5 )
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<em>#boolean</em>
|
||||
<a id="#(SPAWN).SpawnUnControlled" >
|
||||
<strong>SPAWN.SpawnUnControlled</strong>
|
||||
</a>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user