Banner Image

Module AI.AI_Cargo_Airplane

AI - Models the intelligent transportation of cargo using airplanes.


Author: FlightControl


Global(s)

Global AI_CARGO_AIRPLANE

Brings a dynamic cargo handling capability for an AI airplane group.

#AI_CARGO_AIRPLANE AI_CARGO_AIRPLANE

Brings a dynamic cargo handling capability for an AI airplane group.

Airplane carrier equipment can be mobilized to intelligently transport infantry and other cargo within the simulation between airbases.

The AI_CARGO_AIRPLANE module uses the Cargo.Cargo capabilities within the MOOSE framework. Cargo.Cargo must be declared within the mission to make AI_CARGO_AIRPLANE recognize the cargo. Please consult the Cargo.Cargo module for more information.

Cargo pickup.

Using the AI_CARGO_AIRPLANE.Pickup() method, you are able to direct the helicopters towards a point on the battlefield to board/load the cargo at the specific coordinate. Ensure that the landing zone is horizontally flat, and that trees cannot be found in the landing vicinity, or the helicopters won't land or will even crash!

Cargo deployment.

Using the AI_CARGO_AIRPLANE.Deploy() method, you are able to direct the helicopters towards a point on the battlefield to unboard/unload the cargo at the specific coordinate. Ensure that the landing zone is horizontally flat, and that trees cannot be found in the landing vicinity, or the helicopters won't land or will even crash!

Infantry health.

When infantry is unboarded from the APCs, the infantry is actually respawned into the battlefield. As a result, the unboarding infantry is very healthy every time it unboards. This is due to the limitation of the DCS simulator, which is not able to specify the health of new spawned units as a parameter. However, infantry that was destroyed when unboarded, won't be respawned again. Destroyed is destroyed. As a result, there is some additional strength that is gained when an unboarding action happens, but in terms of simulation balance this has marginal impact on the overall battlefield simulation. Fortunately, the firing strength of infantry is limited, and thus, respacing healthy infantry every time is not so much of an issue ...

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_CARGO_AIRPLANE Description

AI_CARGO_AIRPLANE.Airbase

AI_CARGO_AIRPLANE.Airplane

AI_CARGO_AIRPLANE.Coalition

AI_CARGO_AIRPLANE:Deploy(Coordinate, Speed, Height, DeployZone)

Deploy Trigger for AI_CARGO_AIRPLANE

AI_CARGO_AIRPLANE:FindCarrier(Airbase, Radius, Coordinate)

Find a free Carrier within a range.

AI_CARGO_AIRPLANE:New(Airplane, CargoSet)

Creates a new AI_CARGO_AIRPLANE object.

AI_CARGO_AIRPLANE:OnAfterDeploy(Airplane, From, Event, To, Coordinate, Speed, Height, DeployZone)

Deploy Handler OnAfter for AI_CARGO_AIRPLANE

AI_CARGO_AIRPLANE:OnAfterDeployed(Airplane, From, Event, To, DeployZone)

On after Deployed event.

AI_CARGO_AIRPLANE:OnAfterLoaded(Airplane, From, Event, To)

On after Loaded event, i.e.

AI_CARGO_AIRPLANE:OnAfterPickup(Airplane, From, Event, To, Coordinate, Speed, Height, PickupZone)

Pickup Handler OnAfter for AI_CARGO_AIRPLANE

AI_CARGO_AIRPLANE:OnBeforeDeploy(Airplane, From, Event, To, Airbase, Speed)

Deploy Handler OnBefore for AI_CARGO_AIRPLANE

AI_CARGO_AIRPLANE:OnBeforePickup(Airplane, From, Event, To, Airbase, Speed)

Pickup Handler OnBefore for AI_CARGO_AIRPLANE

AI_CARGO_AIRPLANE:Pickup(Coordinate, Speed, Height, PickupZone)

Pickup Trigger for AI_CARGO_AIRPLANE

AI_CARGO_AIRPLANE.PickupZone

AI_CARGO_AIRPLANE:Route(Airplane, Airbase, Speed, Height, Uncontrolled)

Route the airplane from one airport or it's current position to another airbase.

AI_CARGO_AIRPLANE.RouteDeploy

AI_CARGO_AIRPLANE.RouteHome

AI_CARGO_AIRPLANE.RoutePickup

AI_CARGO_AIRPLANE:SetCarrier(Airplane)

Set the Carrier (controllable).

AI_CARGO_AIRPLANE:__Deploy(Delay, Coordinate, Speed, Height, DeployZone)

Deploy Asynchronous Trigger for AI_CARGO_AIRPLANE

AI_CARGO_AIRPLANE:__Pickup(Delay, Coordinate, Speed, Height, PickupZone)

Pickup Asynchronous Trigger for AI_CARGO_AIRPLANE

AI_CARGO_AIRPLANE:onafterDeploy(Airplane, From, Event, To, Coordinate, Speed, Height, DeployZone)

On after Depoly event.

AI_CARGO_AIRPLANE:onafterHome(Airplane, From, Event, To, Coordinate, Speed, Height, HomeZone)

On after Home event.

AI_CARGO_AIRPLANE:onafterLanded(Airplane, From, Event, To)

On after "Landed" event.

AI_CARGO_AIRPLANE:onafterPickup(Airplane, From, Event, To, Coordinate, Speed, Height, PickupZone)

On after "Pickup" event.

AI_CARGO_AIRPLANE:onafterUnload(Airplane, From, Event, To, DeployZone)

On after Unload event.

Field(s)

#boolean AI_CARGO_AIRPLANE.RouteHome

We are going home!

#boolean AI_CARGO_AIRPLANE.RoutePickup

Aircraft is on a pickup mission.

Function(s)

Deploy Trigger for AI_CARGO_AIRPLANE

Defined in:

AI_CARGO_AIRPLANE

Parameters:

Coordinate where to deploy stuff.

#number Speed

Speed in km/h for travelling to the deploy base.

#number Height

Height in meters to move to the home coordinate.

The airbase zone where the cargo will be deployed.

Find a free Carrier within a range.

Defined in:

AI_CARGO_AIRPLANE

Parameters:

#number Radius

Coordinate

Return value:

NewCarrier

Creates a new AI_CARGO_AIRPLANE object.

Defined in:

AI_CARGO_AIRPLANE

Parameters:

Plane used for transportation of cargo.

Cargo set to be transported.

Return value:

Deploy Handler OnAfter for AI_CARGO_AIRPLANE

Defined in:

AI_CARGO_AIRPLANE

Parameters:

Cargo plane.

#string From

From state.

#string Event

Event.

#string To

To state.

Coordinate where to deploy stuff.

#number Speed

Speed in km/h for travelling to the deploy base.

#number Height

Height in meters to move to the home coordinate.

The airbase zone where the cargo will be deployed.

On after Deployed event.

Defined in:

AI_CARGO_AIRPLANE

Parameters:

Cargo plane.

#string From

From state.

#string Event

Event.

#string To

To state.

Core.Zone#ZONE DeployZone

The zone wherein the cargo is deployed.

On after Loaded event, i.e.

triggered when the cargo is inside the carrier.

Defined in:

AI_CARGO_AIRPLANE

Parameters:

Cargo plane.

From

Event

To

Pickup Handler OnAfter for AI_CARGO_AIRPLANE

Defined in:

AI_CARGO_AIRPLANE

Parameters:

Cargo transport plane.

#string From

From state.

#string Event

Event.

#string To

To state.

The coordinate where to pickup stuff.

#number Speed

Speed in km/h for travelling to pickup base.

#number Height

Height in meters to move to the pickup coordinate.

The airbase zone where the cargo will be picked up.

Deploy Handler OnBefore for AI_CARGO_AIRPLANE

Defined in:

AI_CARGO_AIRPLANE

Parameters:

Cargo plane.

#string From

#string Event

#string To

Destination airbase where troops are deployed.

#number Speed

Speed in km/h for travelling to deploy base.

Return value:

#boolean:

Pickup Handler OnBefore for AI_CARGO_AIRPLANE

Defined in:

AI_CARGO_AIRPLANE

Parameters:

Cargo transport plane.

#string From

From state.

#string Event

Event.

#string To

To state.

Airbase where troops are picked up.

#number Speed

in km/h for travelling to pickup base.

Return value:

#boolean:

Pickup Trigger for AI_CARGO_AIRPLANE

Defined in:

AI_CARGO_AIRPLANE

Parameters:

The coordinate where to pickup stuff.

#number Speed

Speed in km/h for travelling to pickup base.

#number Height

Height in meters to move to the pickup coordinate.

The airbase zone where the cargo will be picked up.

Route the airplane from one airport or it's current position to another airbase.

Defined in:

AI_CARGO_AIRPLANE

Parameters:

Airplane group to be routed.

Destination airbase.

#number Speed

Speed in km/h. Default is 80% of max possible speed the group can do.

#number Height

Height in meters to move to the Airbase.

#boolean Uncontrolled

If true, spawn group in uncontrolled state.

Set the Carrier (controllable).

Also initializes events for carrier and defines the coalition.

Defined in:

AI_CARGO_AIRPLANE

Parameter:

Transport plane.

Return value:

Deploy Asynchronous Trigger for AI_CARGO_AIRPLANE

Defined in:

AI_CARGO_AIRPLANE

Parameters:

#number Delay

Delay in seconds.

Coordinate where to deploy stuff.

#number Speed

Speed in km/h for travelling to the deploy base.

#number Height

Height in meters to move to the home coordinate.

The airbase zone where the cargo will be deployed.

Pickup Asynchronous Trigger for AI_CARGO_AIRPLANE

Defined in:

AI_CARGO_AIRPLANE

Parameters:

#number Delay

Delay in seconds.

The coordinate where to pickup stuff.

#number Speed

Speed in km/h for travelling to pickup base.

#number Height

Height in meters to move to the pickup coordinate.

The airbase zone where the cargo will be picked up.

On after Depoly event.

Routes plane to the airbase where the troops are deployed.

Defined in:

AI_CARGO_AIRPLANE

Parameters:

Cargo transport plane.

#string From

From state.

#string Event

Event.

#string To

To state.

Coordinate where to deploy stuff.

#number Speed

Speed in km/h for travelling to the deploy base.

#number Height

Height in meters to move to the home coordinate.

The airbase zone where the cargo will be deployed.

On after Home event.

Aircraft will be routed to their home base.

Defined in:

AI_CARGO_AIRPLANE

Parameters:

The cargo plane.

From

From state.

Event

Event.

To

To State.

Home place (not used).

#number Speed

Speed in km/h to fly to the home airbase (zone). Default is 80% of max possible speed the unit can go.

#number Height

Height in meters to move to the home coordinate.

The home airbase (zone) where the plane should return to.

On after "Landed" event.

Called on engine shutdown and initiates the pickup mission or unloading event.

Defined in:

AI_CARGO_AIRPLANE

Parameters:

Cargo transport plane.

From

Event

To

On after "Pickup" event.

Routes transport to pickup airbase.

Defined in:

AI_CARGO_AIRPLANE

Parameters:

Cargo transport plane.

#string From

From state.

#string Event

Event.

#string To

To state.

The coordinate where to pickup stuff.

#number Speed

Speed in km/h for travelling to pickup base.

#number Height

Height in meters to move to the pickup coordinate.

The airbase zone where the cargo will be picked up.

On after Unload event.

Cargo is beeing unloaded, i.e. the unboarding process is started.

Defined in:

AI_CARGO_AIRPLANE

Parameters:

Cargo transport plane.

#string From

From state.

#string Event

Event.

#string To

To state.

The airbase zone where the cargo will be deployed.