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. |
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:
- AI.AI_Cargo_APC - Cargo transportation using APCs and other vehicles between zones.
- AI.AI_Cargo_Helicopter - Cargo transportation using helicopters between zones.
- AI.AI_Cargo_Airplane - Cargo transportation using airplanes to and from airbases.
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)
Field(s)
Function(s)
Deploy Trigger for AI_CARGO
Defined in:
AI_CARGO
Parameters:
Core.Point#COORDINATE Coordinate
#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:
Wrapper.Group#GROUP Carrier
Cargo carrier group.
Core.Set#SET_CARGO CargoSet
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
Core.Point#COORDINATE Coordinate
#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:
Wrapper.Group#GROUP Carrier
#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
Pickup Handler OnAfter for AI_CARGO
Defined in:
AI_CARGO
Parameters:
#string From
#string Event
#string To
Core.Point#COORDINATE Coordinate
#number Speed
Speed in km/h. Default is 50% of max possible speed the group can do.
Unloaded Handler OnAfter for AI_CARGO
Deploy Handler OnBefore for AI_CARGO
Defined in:
AI_CARGO
Parameters:
#string From
#string Event
#string To
Core.Point#COORDINATE Coordinate
#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
Core.Point#COORDINATE Coordinate
#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:
Core.Point#COORDINATE Coordinate
#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
Core.Point#COORDINATE Coordinate
#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
Core.Point#COORDINATE Coordinate
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:
Wrapper.Group#GROUP Carrier
#string From
From state.
#string Event
Event.
#string To
To state.
Cargo.Cargo#CARGO Cargo
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
Core.Point#COORDINATE Coordinate
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:
Wrapper.Group#GROUP Carrier
#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:
Wrapper.Group#GROUP Carrier
#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:
Wrapper.Group#GROUP Carrier
#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
Core.Point#COORDINATE Coordinate
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:
Wrapper.Group#GROUP Carrier
#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:
Wrapper.Group#GROUP Carrier
#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
AI_CARGO:onafterUnloaded(Carrier, From, Event, To, Cargo, Deployed, DeployZone, CarrierUnit, Defend)
On after Unloaded event.
Defined in:
AI_CARGO
Parameters:
Wrapper.Group#GROUP Carrier
#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:
Wrapper.Group#GROUP Carrier
#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:
Wrapper.Group#GROUP Carrier
#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.