Banner Image

Module AI.AI_Cargo

AI - Models the intelligent transportation of infantry and other cargo.


Author: FlightControl


Global(s)

Global AI_CARGO

Base class for the dynamic cargo handling capability for AI groups.

#AI_CARGO AI_CARGO

Base class for the dynamic cargo handling capability for AI groups.

Carriers can be mobilized to intelligently transport infantry and other cargo within the simulation. The AI_CARGO module uses the Cargo.Cargo capabilities within the MOOSE framework. CARGO derived objects must be declared within the mission to make the AI_CARGO object recognize the cargo. Please consult the Cargo.Cargo module for more information.

The derived classes from this module are:

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 Description

AI_CARGO.CargoCarrier

AI_CARGO.CargoSet

AI_CARGO.Carrier_Cargo

AI_CARGO:Deploy(Coordinate, Speed)

Deploy Trigger for AI_CARGO

AI_CARGO:IsRelocating()

AI_CARGO:IsTransporting()

AI_CARGO:New(Carrier, CargoSet)

Creates a new AI_CARGO object.

AI_CARGO:OnAfterDeploy(From, Event, To, Coordinate, Speed)

Deploy Handler OnAfter for AI_CARGO

AI_CARGO:OnAfterDeployed(Carrier, From, Event, To, DeployZone, Defend)

On after Deployed event.

AI_CARGO:OnAfterLoaded(Carrier, From, Event, To)

Loaded Handler OnAfter for AI_CARGO

AI_CARGO:OnAfterPickup(From, Event, To, Coordinate, Speed)

Pickup Handler OnAfter for AI_CARGO

AI_CARGO:OnAfterUnloaded(Carrier, From, Event, To)

Unloaded Handler OnAfter for AI_CARGO

AI_CARGO:OnBeforeDeploy(From, Event, To, Coordinate, Speed)

Deploy Handler OnBefore for AI_CARGO

AI_CARGO:OnBeforePickup(From, Event, To, Coordinate, Speed)

Pickup Handler OnBefore for AI_CARGO

AI_CARGO:Pickup(Coordinate, Speed)

Pickup Trigger for AI_CARGO

AI_CARGO.Relocating

AI_CARGO.Transporting

AI_CARGO:__Deploy(Delay, Coordinate, Speed)

Deploy Asynchronous Trigger for AI_CARGO

AI_CARGO:__Pickup(Delay, Coordinate, Speed)

Pickup Asynchronous Trigger for AI_CARGO

AI_CARGO:onafterBoard(Carrier, From, Event, To, Cargo, CarrierUnit, PickupZone)

On after Board event.

AI_CARGO:onafterDeploy(APC, From, Event, To, Coordinate, Speed, Height, DeployZone)

On after Deploy event.

AI_CARGO:onafterDeployed(Carrier, From, Event, To, DeployZone, Defend)

On after Deployed event.

AI_CARGO:onafterLoaded(Carrier, From, Event, To, PickupZone, Cargo)

On after Loaded event.

AI_CARGO:onafterPickedUp(Carrier, From, Event, To, PickupZone)

On after PickedUp event.

AI_CARGO:onafterPickup(APC, From, Event, To, Coordinate, Speed, Height, PickupZone)

On after Pickup event.

AI_CARGO:onafterUnboard(Carrier, From, Event, To, Cargo, DeployZone, CarrierUnit, Defend)

On after Unboard event.

AI_CARGO:onafterUnload(Carrier, From, Event, To, DeployZone, Defend)

On after Unload event.

AI_CARGO:onafterUnloaded(Carrier, From, Event, To, Cargo, Deployed, DeployZone, CarrierUnit, Defend)

On after Unloaded event.

AI_CARGO:onbeforeLoad(Carrier, From, Event, To, PickupZone)

On before Load event.

AI_CARGO:onbeforeReload(Carrier, From, Event, To, PickupZone)

On before Reload event.

Field(s)

Function(s)

Deploy Trigger for AI_CARGO

Defined in:

AI_CARGO

Parameters:

#number Speed

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

Defined in:

AI_CARGO

Defined in:

AI_CARGO

Creates a new AI_CARGO object.

Defined in:

AI_CARGO

Parameters:

Cargo carrier group.

Set of cargo(s) to transport.

Return value:

self

Deploy Handler OnAfter for AI_CARGO

Defined in:

AI_CARGO

Parameters:

#string From

#string Event

#string To

#number Speed

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

On after Deployed event.

Defined in:

AI_CARGO

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

Core.Zone#ZONE DeployZone

The zone wherein the cargo is deployed. This can be any zone type, like a ZONE, ZONE_GROUP, ZONE_AIRBASE.

#boolean Defend

Defend for APCs.

Loaded Handler OnAfter for AI_CARGO

Defined in:

AI_CARGO

Parameters:

#string From

#string Event

#string To

Pickup Handler OnAfter for AI_CARGO

Defined in:

AI_CARGO

Parameters:

#string From

#string Event

#string To

#number Speed

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

Unloaded Handler OnAfter for AI_CARGO

Defined in:

AI_CARGO

Parameters:

#string From

#string Event

#string To

Deploy Handler OnBefore for AI_CARGO

Defined in:

AI_CARGO

Parameters:

#string From

#string Event

#string To

#number Speed

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

Return value:

#boolean:

Pickup Handler OnBefore for AI_CARGO

Defined in:

AI_CARGO

Parameters:

#string From

#string Event

#string To

#number Speed

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

Return value:

#boolean:

Pickup Trigger for AI_CARGO

Defined in:

AI_CARGO

Parameters:

#number Speed

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

Deploy Asynchronous Trigger for AI_CARGO

Defined in:

AI_CARGO

Parameters:

#number Delay

#number Speed

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

Pickup Asynchronous Trigger for AI_CARGO

Defined in:

AI_CARGO

Parameters:

#number Delay

Pickup place. If not given, loading starts at the current location.

#number Speed

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

On after Board event.

Defined in:

AI_CARGO

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

Cargo object.

Wrapper.Unit#UNIT CarrierUnit

Core.Zone#ZONE PickupZone

(optional) The zone where the cargo will be picked up. The PickupZone can be nil, if there wasn't any PickupZoneSet provided.

On after Deploy event.

Defined in:

AI_CARGO

Parameters:

From

Event

To

Deploy place.

#number Speed

Speed in km/h to drive to the depoly coordinate. Default is 50% of max possible speed the unit can go.

#number Height

Height in meters to move to the deploy coordinate.

Core.Zone#ZONE DeployZone

The zone where the cargo will be deployed.

On after Deployed event.

Defined in:

AI_CARGO

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

Core.Zone#ZONE DeployZone

The zone wherein the cargo is deployed. This can be any zone type, like a ZONE, ZONE_GROUP, ZONE_AIRBASE.

#boolean Defend

Defend for APCs.

On after Loaded event.

Defined in:

AI_CARGO

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

Core.Zone#ZONE PickupZone

(optional) The zone where the cargo will be picked up. The PickupZone can be nil, if there wasn't any PickupZoneSet provided.

Cargo

Return value:

#boolean:

Cargo loaded.

On after PickedUp event.

Defined in:

AI_CARGO

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

Core.Zone#ZONE PickupZone

(optional) The zone where the cargo will be picked up. The PickupZone can be nil, if there wasn't any PickupZoneSet provided.

On after Pickup event.

Defined in:

AI_CARGO

Parameters:

From

Event

To

of the pickup point.

#number Speed

Speed in km/h to drive to the pickup coordinate. Default is 50% of max possible speed the unit can go.

#number Height

Height in meters to move to the home coordinate.

Core.Zone#ZONE PickupZone

(optional) The zone where the cargo will be picked up. The PickupZone can be nil, if there wasn't any PickupZoneSet provided.

On after Unboard event.

Defined in:

AI_CARGO

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

#string Cargo

Cargo#CARGO Cargo Cargo object.

Core.Zone#ZONE DeployZone

The zone wherein the cargo is deployed. This can be any zone type, like a ZONE, ZONE_GROUP, ZONE_AIRBASE.

CarrierUnit

Defend

On after Unload event.

Defined in:

AI_CARGO

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

Core.Zone#ZONE DeployZone

The zone wherein the cargo is deployed. This can be any zone type, like a ZONE, ZONE_GROUP, ZONE_AIRBASE.

Defend

On after Unloaded event.

Defined in:

AI_CARGO

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

#string Cargo

Cargo#CARGO Cargo Cargo object.

#boolean Deployed

Cargo is deployed.

Core.Zone#ZONE DeployZone

The zone wherein the cargo is deployed. This can be any zone type, like a ZONE, ZONE_GROUP, ZONE_AIRBASE.

CarrierUnit

Defend

On before Load event.

Defined in:

AI_CARGO

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

Core.Zone#ZONE PickupZone

(optional) The zone where the cargo will be picked up. The PickupZone can be nil, if there wasn't any PickupZoneSet provided.

On before Reload event.

Defined in:

AI_CARGO

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

Core.Zone#ZONE PickupZone

(optional) The zone where the cargo will be picked up. The PickupZone can be nil, if there wasn't any PickupZoneSet provided.