Banner Image

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.

#AI_AIR_ENGAGE AI_AIR_ENGAGE

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

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

AI_AIR_ENGAGE:Abort()

Synchronous Event Trigger for Event Abort.

AI_AIR_ENGAGE:Accomplish()

Synchronous Event Trigger for Event Accomplish.

AI_AIR_ENGAGE.Accomplished

AI_AIR_ENGAGE:Destroy()

Synchronous Event Trigger for Event Destroy.

AI_AIR_ENGAGE:Engage()

Synchronous Event Trigger for Event Engage.

AI_AIR_ENGAGE.EngageAltType

AI_AIR_ENGAGE.EngageCeilingAltitude

AI_AIR_ENGAGE.EngageFloorAltitude

AI_AIR_ENGAGE.EngageMaxSpeed

AI_AIR_ENGAGE.EngageMinSpeed

AI_AIR_ENGAGE:EngageRoute()

Synchronous Event Trigger for Event EngageRoute.

AI_AIR_ENGAGE.Engaging

AI_AIR_ENGAGE:Fired()

Synchronous Event Trigger for Event Fired.

AI_AIR_ENGAGE:New(AI_Air, AIGroup, EngageMinSpeed, EngageMaxSpeed, EngageFloorAltitude, EngageCeilingAltitude, EngageAltType)

Creates a new AI_AIR_ENGAGE object

AI_AIR_ENGAGE:OnAfterAbort(AIGroup, From, Event, To)

OnAfter Transition Handler for Event Abort.

AI_AIR_ENGAGE:OnAfterAccomplish(AIGroup, From, Event, To)

OnAfter Transition Handler for Event Accomplish.

AI_AIR_ENGAGE:OnAfterDestroy(AIGroup, From, Event, To)

OnAfter Transition Handler for Event Destroy.

AI_AIR_ENGAGE:OnAfterEngage(AIGroup, From, Event, To)

OnAfter Transition Handler for Event Engage.

AI_AIR_ENGAGE:OnAfterEngageRoute(AIGroup, From, Event, To)

OnAfter Transition Handler for Event EngageRoute.

AI_AIR_ENGAGE:OnAfterFired(AIGroup, From, Event, To)

OnAfter Transition Handler for Event Fired.

AI_AIR_ENGAGE:OnBeforeAbort(AIGroup, From, Event, To)

OnBefore Transition Handler for Event Abort.

AI_AIR_ENGAGE:OnBeforeAccomplish(AIGroup, From, Event, To)

OnBefore Transition Handler for Event Accomplish.

AI_AIR_ENGAGE:OnBeforeDestroy(AIGroup, From, Event, To)

OnBefore Transition Handler for Event Destroy.

AI_AIR_ENGAGE:OnBeforeEngage(AIGroup, From, Event, To)

OnBefore Transition Handler for Event Engage.

AI_AIR_ENGAGE:OnBeforeEngageRoute(AIGroup, From, Event, To)

OnBefore Transition Handler for Event EngageRoute.

AI_AIR_ENGAGE:OnBeforeFired(AIGroup, From, Event, To)

OnBefore Transition Handler for Event Fired.

AI_AIR_ENGAGE:OnEnterEngaging(AIGroup, From, Event, To)

OnEnter Transition Handler for State Engaging.

AI_AIR_ENGAGE:OnEventDead(EventData)

AI_AIR_ENGAGE:OnLeaveEngaging(AIGroup, From, Event, To)

OnLeave Transition Handler for State Engaging.

AI_AIR_ENGAGE.Resume(AIEngage, Fsm)

AI_AIR_ENGAGE:__Abort(Delay)

Asynchronous Event Trigger for Event Abort.

AI_AIR_ENGAGE:__Accomplish(Delay)

Asynchronous Event Trigger for Event Accomplish.

AI_AIR_ENGAGE:__Destroy(Delay)

Asynchronous Event Trigger for Event Destroy.

AI_AIR_ENGAGE:__Engage(Delay)

Asynchronous Event Trigger for Event Engage.

AI_AIR_ENGAGE:__EngageRoute(Delay)

Asynchronous Event Trigger for Event EngageRoute.

AI_AIR_ENGAGE:__Fired(Delay)

Asynchronous Event Trigger for Event Fired.

AI_AIR_ENGAGE.___Engage(AIGroup, Fsm, AttackSetUnit)

AI_AIR_ENGAGE.___EngageRoute(AIGroup, Fsm, AttackSetUnit)

AI_AIR_ENGAGE:onafterAbort(AIGroup, From, Event, To)

onafter event handler for Abort event.

AI_AIR_ENGAGE:onafterAccomplish(AIGroup, From, Event, To)

AI_AIR_ENGAGE:onafterDestroy(AIGroup, From, Event, To, EventData)

AI_AIR_ENGAGE:onafterEngage(AIGroup, From, Event, To)

onafter event handler for Engage event.

AI_AIR_ENGAGE:onafterEngageRoute(DefenderGroup, From, Event, To, AttackSetUnit)

AI_AIR_ENGAGE:onafterStart(AIGroup, From, Event, To)

onafter event handler for Start event.

AI_AIR_ENGAGE:onbeforeEngage(AIGroup, From, Event, To)

onbefore event handler for Engage event.

Field(s)

Function(s)

Synchronous Event Trigger for Event Abort.

Defined in:

AI_AIR_ENGAGE

Synchronous Event Trigger for Event Accomplish.

Defined in:

AI_AIR_ENGAGE

Synchronous Event Trigger for Event Destroy.

Defined in:

AI_AIR_ENGAGE

Synchronous Event Trigger for Event Engage.

Defined in:

AI_AIR_ENGAGE

Synchronous Event Trigger for Event EngageRoute.

Defined in:

AI_AIR_ENGAGE

Synchronous Event Trigger for Event Fired.

Defined in:

AI_AIR_ENGAGE

Creates a new AI_AIR_ENGAGE object

Defined in:

AI_AIR_ENGAGE

Parameters:

The AI_AIR FSM.

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:

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:

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:

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:

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:

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:

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:

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:

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:

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:

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:

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:

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:

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:

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:

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:

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:

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:

The group Object managed by the FSM.

#string From

The From State string.

#string Event

The Event string.

#string To

The To State string.