Module Cas
-
-SP:Y MP:Y AI:Y HU:N TYP:Air -- This module contains the AICASZONE class.
- - - -- -
1) #AICASZONE class, extends Core.Fsm#FSM_CONTROLLABLE
-The #AICASZONE class implements the core functions to CAS a Zone by an AIR Controllable Group.
- -1.1) AICASZONE constructor:
- --
-
- AICASZONE.New(): Creates a new AICASZONE object. -
1.2) AICASZONE state machine:
-The AICASZONE is a state machine: it manages the different events and states of the AIControllable it is controlling.
- -1.2.1) AICASZONE Events:
- --
-
- AICASZONE.TakeOff( AIControllable ): The AI is taking-off from an airfield. -
- AICASZONE.Hold( AIControllable ): The AI is holding in airspace at a zone. -
- AICASZONE.Engage( AIControllable ): The AI is engaging the targets. -
- AICASZONE.WeaponReleased( AIControllable ): The AI has released a weapon to the target. -
- AICASZONE.Destroy( AIControllable ): The AI has destroyed a target. -
- AICASZONE.Complete( AIControllable ): The AI has destroyed all defined targets. -
- AICASZONE.RTB( AIControllable ): The AI is returning to the home base. -
1.2.2) AICASZONE States:
- - -1.2.3) AICASZONE state transition methods:
- - -1.3) Manage the AICASZONE parameters:
-The following methods are available to modify the parameters of an AICASZONE object:
- --
-
- AICASZONE.SetControllable(): Set the AIControllable. -
- AICASZONE.GetControllable(): Get the AIControllable. -
- -
API CHANGE HISTORY
- -The underlying change log documents the API changes. Please read this carefully. The following notation is used:
- --
-
- Added parts are expressed in bold type face. -
- Removed parts are expressed in italic type face. -
Hereby the change log:
- -2017-01-12: Initial class and API.
- -- -
AUTHORS and CONTRIBUTIONS
- -Contributions:
- --
-
- Quax: Concept & Testing. -
- Pikey: Concept & Testing. -
Authors:
- --
-
- FlightControl: Concept, Design & Programming. -
Global(s)
-| AI_CAS_ZONE | -- - | -
| _NewEngageRoute(AIControllable) | -- - | -
Type AI_CAS_ZONE
- Global(s)
--
-
- - - #AI_CAS_ZONE - -AI_CAS_ZONE - - -
- - - - - -
-
-
- - - -_NewEngageRoute(AIControllable) - - -
-
-
-
-
-
Parameter
--
-
-
-
-
- -Wrapper.Controllable#CONTROLLABLE AIControllable:
-
- -
-
-
Type Cas
-
- Type AI_CAS_ZONE
-
-AICASZONE class
- -Field(s)
--
-
- - - Wrapper.Controllable#CONTROLLABLE - -AI_CAS_ZONE.AIControllable - - -
-
-
-
The Controllable patrolling.
- -
-
-
-
- - - -AI_CAS_ZONE:Abort() - - -
-
-
-
Synchronous Event Trigger for Event Abort.
- -
-
-
-
- - - -AI_CAS_ZONE:Accomplish() - - -
-
-
-
Synchronous Event Trigger for Event Accomplish.
- -
-
-
-
- - - #boolean - -AI_CAS_ZONE.Accomplished - - -
- - - - - -
-
-
- - - #boolean - -AI_CAS_ZONE.CheckStatus - - -
- - - - - -
-
-
- - - #string - -AI_CAS_ZONE.ClassName - - -
- - - - - -
-
-
- - - -AI_CAS_ZONE:Destroy() - - -
-
-
-
Synchronous Event Trigger for Event Destroy.
- -
-
-
-
- - - #boolean - -AI_CAS_ZONE.DetectUnits - - -
- - - - - -
-
-
- - - -AI_CAS_ZONE:Engage() - - -
-
-
-
Synchronous Event Trigger for Event Engage.
- -
-
-
-
- - - - -AI_CAS_ZONE.EngageZone - - -
- - - - - -
-
-
- - - -AI_CAS_ZONE:Fired() - - -
-
-
-
Synchronous Event Trigger for Event Fired.
- -
-
-
-
- - - -AI_CAS_ZONE:New(PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed, EngageZone) - - -
-
-
-
Creates a new AICASZONE object
- -Parameters
--
-
-
-
-
- -Core.Zone#ZONE_BASE PatrolZone: -The Zone where the patrol needs to be executed.
- -
-
-
- -Dcs.DCSTypes#Altitude PatrolFloorAltitude: -The lowest altitude in meters where to execute the patrol.
- -
-
-
- -Dcs.DCSTypes#Altitude PatrolCeilingAltitude: -The highest altitude in meters where to execute the patrol.
- -
-
-
- -Dcs.DCSTypes#Speed PatrolMinSpeed: -The minimum speed of the Controllable in km/h.
- -
-
-
- -Dcs.DCSTypes#Speed PatrolMaxSpeed: -The maximum speed of the Controllable in km/h.
- -
-
-
- -Core.Zone#ZONE EngageZone:
-
Return value
- -#AICASZONE: -self
- -
- -
-
-
-
-
- - - -AI_CAS_ZONE:OnAfterAbort(Controllable, From, Event, To) - - -
-
-
-
OnAfter Transition Handler for Event Abort.
- -Parameters
--
-
-
-
-
- -Wrapper.Controllable#CONTROLLABLE Controllable: -The Controllable Object managed by the FSM.
- -
-
-
- -#string From: -The From State string.
- -
-
-
- -#string Event: -The Event string.
- -
-
-
- -#string To: -The To State string.
-
- -
-
-
-
-
- - - -AI_CAS_ZONE:OnAfterAccomplish(Controllable, From, Event, To) - - -
-
-
-
OnAfter Transition Handler for Event Accomplish.
- -Parameters
--
-
-
-
-
- -Wrapper.Controllable#CONTROLLABLE Controllable: -The Controllable Object managed by the FSM.
- -
-
-
- -#string From: -The From State string.
- -
-
-
- -#string Event: -The Event string.
- -
-
-
- -#string To: -The To State string.
-
- -
-
-
-
-
- - - -AI_CAS_ZONE:OnAfterDestroy(Controllable, From, Event, To) - - -
-
-
-
OnAfter Transition Handler for Event Destroy.
- -Parameters
--
-
-
-
-
- -Wrapper.Controllable#CONTROLLABLE Controllable: -The Controllable Object managed by the FSM.
- -
-
-
- -#string From: -The From State string.
- -
-
-
- -#string Event: -The Event string.
- -
-
-
- -#string To: -The To State string.
-
- -
-
-
-
-
- - - -AI_CAS_ZONE:OnAfterEngage(Controllable, From, Event, To) - - -
-
-
-
OnAfter Transition Handler for Event Engage.
- -Parameters
--
-
-
-
-
- -Wrapper.Controllable#CONTROLLABLE Controllable: -The Controllable Object managed by the FSM.
- -
-
-
- -#string From: -The From State string.
- -
-
-
- -#string Event: -The Event string.
- -
-
-
- -#string To: -The To State string.
-
- -
-
-
-
-
- - - -AI_CAS_ZONE:OnAfterFired(Controllable, From, Event, To) - - -
-
-
-
OnAfter Transition Handler for Event Fired.
- -Parameters
--
-
-
-
-
- -Wrapper.Controllable#CONTROLLABLE Controllable: -The Controllable Object managed by the FSM.
- -
-
-
- -#string From: -The From State string.
- -
-
-
- -#string Event: -The Event string.
- -
-
-
- -#string To: -The To State string.
-
- -
-
-
-
-
- - - -AI_CAS_ZONE:OnBeforeAbort(Controllable, From, Event, To) - - -
-
-
-
OnBefore Transition Handler for Event Abort.
- -Parameters
--
-
-
-
-
- -Wrapper.Controllable#CONTROLLABLE Controllable: -The Controllable Object managed by the FSM.
- -
-
-
- -#string From: -The From State string.
- -
-
-
- -#string Event: -The Event string.
- -
-
-
- -#string To: -The To State string.
-
Return value
- -#boolean: -Return false to cancel Transition.
- -
- -
-
-
-
-
- - - -AI_CAS_ZONE:OnBeforeAccomplish(Controllable, From, Event, To) - - -
-
-
-
OnBefore Transition Handler for Event Accomplish.
- -Parameters
--
-
-
-
-
- -Wrapper.Controllable#CONTROLLABLE Controllable: -The Controllable Object managed by the FSM.
- -
-
-
- -#string From: -The From State string.
- -
-
-
- -#string Event: -The Event string.
- -
-
-
- -#string To: -The To State string.
-
Return value
- -#boolean: -Return false to cancel Transition.
- -
- -
-
-
-
-
- - - -AI_CAS_ZONE:OnBeforeDestroy(Controllable, From, Event, To) - - -
-
-
-
OnBefore Transition Handler for Event Destroy.
- -Parameters
--
-
-
-
-
- -Wrapper.Controllable#CONTROLLABLE Controllable: -The Controllable Object managed by the FSM.
- -
-
-
- -#string From: -The From State string.
- -
-
-
- -#string Event: -The Event string.
- -
-
-
- -#string To: -The To State string.
-
Return value
- -#boolean: -Return false to cancel Transition.
- -
- -
-
-
-
-
- - - -AI_CAS_ZONE:OnBeforeEngage(Controllable, From, Event, To) - - -
-
-
-
OnBefore Transition Handler for Event Engage.
- -Parameters
--
-
-
-
-
- -Wrapper.Controllable#CONTROLLABLE Controllable: -The Controllable Object managed by the FSM.
- -
-
-
- -#string From: -The From State string.
- -
-
-
- -#string Event: -The Event string.
- -
-
-
- -#string To: -The To State string.
-
Return value
- -#boolean: -Return false to cancel Transition.
- -
- -
-
-
-
-
- - - -AI_CAS_ZONE:OnBeforeFired(Controllable, From, Event, To) - - -
-
-
-
OnBefore Transition Handler for Event Fired.
- -Parameters
--
-
-
-
-
- -Wrapper.Controllable#CONTROLLABLE Controllable: -The Controllable Object managed by the FSM.
- -
-
-
- -#string From: -The From State string.
- -
-
-
- -#string Event: -The Event string.
- -
-
-
- -#string To: -The To State string.
-
Return value
- -#boolean: -Return false to cancel Transition.
- -
- -
-
-
-
-
- - - -AI_CAS_ZONE:OnDead(EventData) - - -
-
-
-
-
-
Parameter
--
-
-
-
-
- -Core.Event#EVENTDATA EventData:
-
- -
-
-
-
-
- - - -AI_CAS_ZONE:OnEnterEngaging(Controllable, From, Event, To) - - -
-
-
-
OnEnter Transition Handler for State Engaging.
- -Parameters
--
-
-
-
-
- -Wrapper.Controllable#CONTROLLABLE Controllable: -The Controllable Object managed by the FSM.
- -
-
-
- -#string From: -The From State string.
- -
-
-
- -#string Event: -The Event string.
- -
-
-
- -#string To: -The To State string.
-
- -
-
-
-
-
- - - -AI_CAS_ZONE:OnLeaveEngaging(Controllable, From, Event, To) - - -
-
-
-
OnLeave Transition Handler for State Engaging.
- -Parameters
--
-
-
-
-
- -Wrapper.Controllable#CONTROLLABLE Controllable: -The Controllable Object managed by the FSM.
- -
-
-
- -#string From: -The From State string.
- -
-
-
- -#string Event: -The Event string.
- -
-
-
- -#string To: -The To State string.
-
Return value
- -#boolean: -Return false to cancel Transition.
- -
- -
-
-
-
-
- - - Core.Zone#ZONE_BASE - -AI_CAS_ZONE.TargetZone - - -
-
-
-
The Zone where the patrol needs to be executed.
- -
-
-
-
- - - -AI_CAS_ZONE:__Abort(Delay) - - -
-
-
-
Asynchronous Event Trigger for Event Abort.
- -Parameter
--
-
-
-
-
- -#number Delay: -The delay in seconds.
-
- -
-
-
-
-
- - - -AI_CAS_ZONE:__Accomplish(Delay) - - -
-
-
-
Asynchronous Event Trigger for Event Accomplish.
- -Parameter
--
-
-
-
-
- -#number Delay: -The delay in seconds.
-
- -
-
-
-
-
- - - -AI_CAS_ZONE:__Destroy(Delay) - - -
-
-
-
Asynchronous Event Trigger for Event Destroy.
- -Parameter
--
-
-
-
-
- -#number Delay: -The delay in seconds.
-
- -
-
-
-
-
- - - -AI_CAS_ZONE:__Engage(Delay) - - -
-
-
-
Asynchronous Event Trigger for Event Engage.
- -Parameter
--
-
-
-
-
- -#number Delay: -The delay in seconds.
-
- -
-
-
-
-
- - - -AI_CAS_ZONE:__Fired(Delay) - - -
-
-
-
Asynchronous Event Trigger for Event Fired.
- -Parameter
--
-
-
-
-
- -#number Delay: -The delay in seconds.
-
- -
-
-
-
-
- - - -AI_CAS_ZONE:onafterAccomplish(Controllable, From, Event, To) - - -
-
-
-
-
-
Parameters
--
-
-
-
-
- -Wrapper.Controllable#CONTROLLABLE Controllable: -The Controllable Object managed by the FSM.
- -
-
-
- -#string From: -The From State string.
- -
-
-
- -#string Event: -The Event string.
- -
-
-
- -#string To: -The To State string.
-
- -
-
-
-
-
- - - -AI_CAS_ZONE:onafterDestroy(Controllable, From, Event, To, EventData) - - -
-
-
-
-
-
Parameters
--
-
-
-
-
- -Wrapper.Controllable#CONTROLLABLE Controllable: -The Controllable Object managed by the FSM.
- -
-
-
- -#string From: -The From State string.
- -
-
-
- -#string Event: -The Event string.
- -
-
-
- -#string To: -The To State string.
- -
-
-
- -Core.Event#EVENTDATA EventData:
-
- -
-
-
-
-
- - - -AI_CAS_ZONE:onafterEngage(Controllable, From, Event, To) - - -
-
-
-
-
-
Parameters
--
-
-
-
-
- -Wrapper.Controllable#CONTROLLABLE Controllable: -The Controllable Object managed by the FSM.
- -
-
-
- -#string From: -The From State string.
- -
-
-
- -#string Event: -The Event string.
- -
-
-
- -#string To: -The To State string.
-
- -
-
-
-
-
- - - -AI_CAS_ZONE:onafterRTB(Controllable, From, Event, To, EventData) - - -
-
-
-
-
-
Parameters
--
-
-
-
-
- -Wrapper.Controllable#CONTROLLABLE Controllable: -The Controllable Object managed by the FSM.
- -
-
-
- -#string From: -The From State string.
- -
-
-
- -#string Event: -The Event string.
- -
-
-
- -#string To: -The To State string.
- -
-
-
- -EventData:
-
- -
-
-
-
-
- - - -AI_CAS_ZONE:onafterStart(Controllable, From, Event, To) - - -
-
-
-
onafter State Transition for Event Start.
- -Parameters
--
-
-
-
-
- -Wrapper.Controllable#CONTROLLABLE Controllable: -The Controllable Object managed by the FSM.
- -
-
-
- -#string From: -The From State string.
- -
-
-
- -#string Event: -The Event string.
- -
-
-
- -#string To: -The To State string.
-
- -
-
-
-
-
- - - -AI_CAS_ZONE:onbeforeEngage(Controllable, From, Event, To) - - -
-
-
-
-
-
Parameters
--
-
-
-
-
- -Wrapper.Controllable#CONTROLLABLE Controllable: -The Controllable Object managed by the FSM.
- -
-
-
- -#string From: -The From State string.
- -
-
-
- -#string Event: -The Event string.
- -
-
-
- -#string To: -The To State string.
-
- -
-
-