Module AI.AI_Air_Engage
AI - Models the process of air to ground engagement for airplanes and helicopters.
This is a class used in the AI.AI_A2G_Dispatcher.
Author: FlightControl
Global(s)
Global AI_AIR_ENGAGE |
Implements the core functions to intercept intruders. |
Implements the core functions to intercept intruders.
Use the Engage trigger to intercept intruders.
The AI_AIR_ENGAGE is assigned a Wrapper.Group and this must be done before the AI_AIR_ENGAGE process can be started using the Start event.
The AI will fly towards the random 3D point within the patrol zone, using a random speed within the given altitude and speed limits. Upon arrival at the 3D point, a new random 3D point will be selected within the patrol zone using the given limits.
This cycle will continue.
During the patrol, the AI will detect enemy targets, which are reported through the Detected event.
When enemies are detected, the AI will automatically engage the enemy.
Until a fuel or damage threshold has been reached by the AI, or when the AI is commanded to RTB. When the fuel threshold has been reached, the airplane will fly towards the nearest friendly airbase and will land.
1. AI_AIR_ENGAGE constructor
- AI_AIR_ENGAGE.New(): Creates a new AI_AIR_ENGAGE object.
2. Set the Zone of Engagement
An optional Core.Zone can be set, that will define when the AI will engage with the detected airborne enemy targets. Use the method AI.AI_CAP#AI_AIR_ENGAGE.SetEngageZone() to define that Zone.
Developer Note
Note while this class still works, it is no longer supported as the original author stopped active development of MOOSE Therefore, this class is considered to be deprecated
Developer Note
Note while this class still works, it is no longer supported as the original author stopped active development of MOOSE Therefore, this class is considered to be deprecated
Type(s)
Fields and Methods inherited from AI_AIR_ENGAGE | Description |
---|---|
Synchronous Event Trigger for Event Abort. |
|
Synchronous Event Trigger for Event Accomplish. |
|
Synchronous Event Trigger for Event Destroy. |
|
Synchronous Event Trigger for Event Engage. |
|
Synchronous Event Trigger for Event EngageRoute. |
|
Synchronous Event Trigger for Event Fired. |
|
Creates a new AI_AIR_ENGAGE object |
|
OnAfter Transition Handler for Event Abort. |
|
OnAfter Transition Handler for Event Accomplish. |
|
OnAfter Transition Handler for Event Destroy. |
|
OnAfter Transition Handler for Event Engage. |
|
OnAfter Transition Handler for Event EngageRoute. |
|
OnAfter Transition Handler for Event Fired. |
|
OnBefore Transition Handler for Event Abort. |
|
OnBefore Transition Handler for Event Accomplish. |
|
OnBefore Transition Handler for Event Destroy. |
|
OnBefore Transition Handler for Event Engage. |
|
OnBefore Transition Handler for Event EngageRoute. |
|
OnBefore Transition Handler for Event Fired. |
|
OnEnter Transition Handler for State Engaging. |
|
OnLeave Transition Handler for State Engaging. |
|
Asynchronous Event Trigger for Event Abort. |
|
Asynchronous Event Trigger for Event Accomplish. |
|
Asynchronous Event Trigger for Event Destroy. |
|
Asynchronous Event Trigger for Event Engage. |
|
Asynchronous Event Trigger for Event EngageRoute. |
|
Asynchronous Event Trigger for Event Fired. |
|
onafter event handler for Abort event. |
|
AI_AIR_ENGAGE:onafterDestroy(AIGroup, From, Event, To, EventData) |
|
onafter event handler for Engage event. |
|
AI_AIR_ENGAGE:onafterEngageRoute(DefenderGroup, From, Event, To, AttackSetUnit) |
|
onafter event handler for Start event. |
|
onbefore event handler for Engage event. |
Field(s)
Function(s)
Synchronous Event Trigger for Event Accomplish.
Defined in:
AI_AIR_ENGAGE
Synchronous Event Trigger for Event EngageRoute.
Defined in:
AI_AIR_ENGAGE
Creates a new AI_AIR_ENGAGE object
Defined in:
AI_AIR_ENGAGE
Parameters:
AI.AI_Air#AI_AIR AI_Air
The AI_AIR FSM.
Wrapper.Group#GROUP AIGroup
The AI group.
DCS#Speed EngageMinSpeed
(optional, default = 50% of max speed) The minimum speed of the Wrapper.Group in km/h when engaging a target.
DCS#Speed EngageMaxSpeed
(optional, default = 75% of max speed) The maximum speed of the Wrapper.Group in km/h when engaging a target.
DCS#Altitude EngageFloorAltitude
(optional, default = 1000m ) The lowest altitude in meters where to execute the engagement.
DCS#Altitude EngageCeilingAltitude
(optional, default = 1500m ) The highest altitude in meters where to execute the engagement.
DCS#AltitudeType EngageAltType
The altitude type ("RADIO"=="AGL", "BARO"=="ASL"). Defaults to "RADIO".
Return value:
OnAfter Transition Handler for Event Abort.
Defined in:
AI_AIR_ENGAGE
Parameters:
Wrapper.Group#GROUP AIGroup
The Group Object managed by the FSM.
#string From
The From State string.
#string Event
The Event string.
#string To
The To State string.
OnAfter Transition Handler for Event Accomplish.
Defined in:
AI_AIR_ENGAGE
Parameters:
Wrapper.Group#GROUP AIGroup
The Group Object managed by the FSM.
#string From
The From State string.
#string Event
The Event string.
#string To
The To State string.
OnAfter Transition Handler for Event Destroy.
Defined in:
AI_AIR_ENGAGE
Parameters:
Wrapper.Group#GROUP AIGroup
The Group Object managed by the FSM.
#string From
The From State string.
#string Event
The Event string.
#string To
The To State string.
OnAfter Transition Handler for Event Engage.
Defined in:
AI_AIR_ENGAGE
Parameters:
Wrapper.Group#GROUP AIGroup
The Group Object managed by the FSM.
#string From
The From State string.
#string Event
The Event string.
#string To
The To State string.
OnAfter Transition Handler for Event EngageRoute.
Defined in:
AI_AIR_ENGAGE
Parameters:
Wrapper.Group#GROUP AIGroup
The Group Object managed by the FSM.
#string From
The From State string.
#string Event
The Event string.
#string To
The To State string.
OnAfter Transition Handler for Event Fired.
Defined in:
AI_AIR_ENGAGE
Parameters:
Wrapper.Group#GROUP AIGroup
The Group Object managed by the FSM.
#string From
The From State string.
#string Event
The Event string.
#string To
The To State string.
OnBefore Transition Handler for Event Abort.
Defined in:
AI_AIR_ENGAGE
Parameters:
Wrapper.Group#GROUP AIGroup
The Group 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.
OnBefore Transition Handler for Event Accomplish.
Defined in:
AI_AIR_ENGAGE
Parameters:
Wrapper.Group#GROUP AIGroup
The Group 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.
OnBefore Transition Handler for Event Destroy.
Defined in:
AI_AIR_ENGAGE
Parameters:
Wrapper.Group#GROUP AIGroup
The Group 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.
OnBefore Transition Handler for Event Engage.
Defined in:
AI_AIR_ENGAGE
Parameters:
Wrapper.Group#GROUP AIGroup
The Group 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.
OnBefore Transition Handler for Event EngageRoute.
Defined in:
AI_AIR_ENGAGE
Parameters:
Wrapper.Group#GROUP AIGroup
The Group 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.
OnBefore Transition Handler for Event Fired.
Defined in:
AI_AIR_ENGAGE
Parameters:
Wrapper.Group#GROUP AIGroup
The Group 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.
OnEnter Transition Handler for State Engaging.
Defined in:
AI_AIR_ENGAGE
Parameters:
Wrapper.Group#GROUP AIGroup
The Group Object managed by the FSM.
#string From
The From State string.
#string Event
The Event string.
#string To
The To State string.
@param #AI_AIR_ENGAGE self @param Core.Event#EVENTDATA EventData
Defined in:
AI_AIR_ENGAGE
Parameter:
EventData
OnLeave Transition Handler for State Engaging.
Defined in:
AI_AIR_ENGAGE
Parameters:
Wrapper.Group#GROUP AIGroup
The Group 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.
@param Wrapper.Group#GROUP AIEngage
Defined in:
AI_AIR_ENGAGE
Parameters:
AIEngage
Fsm
Asynchronous Event Trigger for Event Abort.
Defined in:
AI_AIR_ENGAGE
Parameter:
#number Delay
The delay in seconds.
Asynchronous Event Trigger for Event Accomplish.
Defined in:
AI_AIR_ENGAGE
Parameter:
#number Delay
The delay in seconds.
Asynchronous Event Trigger for Event Destroy.
Defined in:
AI_AIR_ENGAGE
Parameter:
#number Delay
The delay in seconds.
Asynchronous Event Trigger for Event Engage.
Defined in:
AI_AIR_ENGAGE
Parameter:
#number Delay
The delay in seconds.
Asynchronous Event Trigger for Event EngageRoute.
Defined in:
AI_AIR_ENGAGE
Parameter:
#number Delay
The delay in seconds.
Asynchronous Event Trigger for Event Fired.
Defined in:
AI_AIR_ENGAGE
Parameter:
#number Delay
The delay in seconds.
@param Wrapper.Group#GROUP AIControllable
Defined in:
AI_AIR_ENGAGE
Parameters:
AIGroup
Fsm
AttackSetUnit
@param Wrapper.Group#GROUP AIControllable
Defined in:
AI_AIR_ENGAGE
Parameters:
AIGroup
Fsm
AttackSetUnit
onafter event handler for Abort event.
Defined in:
AI_AIR_ENGAGE
Parameters:
Wrapper.Group#GROUP AIGroup
The AI Group managed by the FSM.
#string From
The From State string.
#string Event
The Event string.
#string To
The To State string.
@param #AI_AIR_ENGAGE self @param Wrapper.Group#GROUP AIGroup The Group 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.
Defined in:
AI_AIR_ENGAGE
Parameters:
AIGroup
From
Event
To
@param #AI_AIR_ENGAGE self @param Wrapper.Group#GROUP AIGroup The Group 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. @param Core.Event#EVENTDATA EventData
Defined in:
AI_AIR_ENGAGE
Parameters:
AIGroup
From
Event
To
EventData
onafter event handler for Engage event.
Defined in:
AI_AIR_ENGAGE
Parameters:
Wrapper.Group#GROUP AIGroup
The AI Group managed by the FSM.
#string From
The From State string.
#string Event
The Event string.
#string To
The To State string.
@param #AI_AIR_ENGAGE self @param Wrapper.Group#GROUP DefenderGroup The GroupGroup managed by the FSM. @param #string From The From State string. @param #string Event The Event string. @param #string To The To State string. @param Core.Set#SET_UNIT AttackSetUnit Unit set to be attacked.
Defined in:
AI_AIR_ENGAGE
Parameters:
DefenderGroup
From
Event
To
AttackSetUnit
onafter event handler for Start event.
Defined in:
AI_AIR_ENGAGE
Parameters:
Wrapper.Group#GROUP AIGroup
The AI group managed by the FSM.
#string From
The From State string.
#string Event
The Event string.
#string To
The To State string.
onbefore event handler for Engage event.
Defined in:
AI_AIR_ENGAGE
Parameters:
Wrapper.Group#GROUP AIGroup
The group Object managed by the FSM.
#string From
The From State string.
#string Event
The Event string.
#string To
The To State string.