Module Cargo.CargoCrate
Cargo - Management of single cargo crates, which are based on a STATIC object.
Demo Missions
YouTube Playlist
Author: FlightControl
Contributions:
Global(s)
Global CARGO_CRATE |
Defines a cargo that is represented by a UNIT object within the simulator, and can be transported by a carrier. |
Defines a cargo that is represented by a UNIT object within the simulator, and can be transported by a carrier.
Use the event functions as described above to Load, UnLoad, Board, UnBoard the CARGO_CRATE objects to and from carriers.
The above cargo classes are used by the following AI_CARGO_ classes to allow AI groups to transport cargo:
- AI Armoured Personnel Carriers to transport cargo and engage in battles, using the AI.AI_Cargo_APC module.
- AI Helicopters to transport cargo, using the AI.AI_Cargo_Helicopter module.
- AI Planes to transport cargo, using the AI.AI_Cargo_Airplane module.
- AI Ships is planned.
The above cargo classes are also used by the TASK_CARGO_ classes to allow human players to transport cargo as part of a tasking:
- Tasking.Task_Cargo_Transport#TASK_CARGO_TRANSPORT to transport cargo by human players.
- Tasking.Task_Cargo_Transport#TASK_CARGO_CSAR to transport downed pilots by human players.
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 CARGO_CRATE | Description |
---|---|
Check if the cargo can be Boarded. |
|
Check if the cargo can be sling loaded. |
|
Check if the cargo can be Unboarded. |
|
Get the current Coordinate of the CargoGroup. |
|
Get the transportation method of the Cargo. |
|
Check if the CargoGroup is alive. |
|
Check if Cargo Crate is in the radius for the Cargo to be Boarded or Loaded. |
|
Check if Cargo Crate is in the radius for the Cargo to be reported. |
|
Check if Cargo is near to the Carrier. |
|
CARGO_CRATE:New(CargoStatic, Type, Name, LoadRadius, NearRadius) |
CARGO_CRATE Constructor. |
Respawn the CargoGroup. |
|
Route Cargo to Coordinate and randomize locations. |
|
Respawn the CargoGroup. |
|
Loaded State. |
|
CARGO_CRATE:onenterUnLoaded(Event, From, To, Core, ToPointVec2) |
Enter UnLoaded State. |
Fields and Methods inherited from CARGO_REPRESENTABLE | Description |
---|---|
CARGO_REPRESENTABLE Destructor. |
|
Send a message to a Wrapper.Group through a communication channel near the cargo. |
|
CARGO_CRATE:New(CargoObject, Type, Name, LoadRadius, NearRadius) |
CARGO_REPRESENTABLE Constructor. |
Route a cargo unit to a PointVec2. |
Models the behaviour of cargo crates, which can be slingloaded and boarded on helicopters.
Field(s)
Function(s)
Get the current Coordinate of the CargoGroup.
Defined in:
CARGO_CRATE
Return values:
The current Coordinate of the first Cargo of the CargoGroup.
#nil:
There is no valid Cargo in the CargoGroup.
Get the transportation method of the Cargo.
Defined in:
CARGO_CRATE
Return value:
#string:
The transportation method of the Cargo.
Check if the CargoGroup is alive.
Defined in:
CARGO_CRATE
Return values:
#boolean:
true if the CargoGroup is alive.
#boolean:
false if the CargoGroup is dead.
Check if Cargo Crate is in the radius for the Cargo to be Boarded or Loaded.
Defined in:
CARGO_CRATE
Parameter:
Core.Point#Coordinate Coordinate
Return value:
#boolean:
true if the Cargo Crate is within the loading radius.
Check if Cargo Crate is in the radius for the Cargo to be reported.
Defined in:
CARGO_CRATE
Parameter:
Core.Point#COORDINATE Coordinate
Return value:
#boolean:
true if the Cargo Crate is within the report radius.
Check if Cargo is near to the Carrier.
The Cargo is near to the Carrier within NearRadius.
Defined in:
CARGO_CRATE
Parameters:
Wrapper.Group#GROUP CargoCarrier
#number NearRadius
Return values:
#boolean:
The Cargo is near to the Carrier.
#nil:
The Cargo is not near to the Carrier.
CARGO_CRATE Constructor.
Defined in:
CARGO_CRATE
Parameters:
Wrapper.Static#STATIC CargoStatic
#string Type
#string Name
#number LoadRadius
(optional)
#number NearRadius
(optional)
Return value:
@param #CARGO_CRATE self @param Core.Event#EVENTDATA EventData
Defined in:
CARGO_CRATE
Parameter:
EventData
Route Cargo to Coordinate and randomize locations.
Loaded State.
Defined in:
CARGO_CRATE
Parameters:
#string Event
#string From
#string To
Wrapper.Unit#UNIT CargoCarrier
Enter UnLoaded State.
Defined in:
CARGO_CRATE
Parameters:
#string Event
#string From
#string To
Core
Point#POINT_VEC2
ToPointVec2
Field(s)
Function(s)
CARGO_REPRESENTABLE Destructor.
Send a message to a Wrapper.Group through a communication channel near the cargo.
Defined in:
Parameters:
#string Message
Wrapper.Group#GROUP TaskGroup
#string Name
(optional) The name of the Group used as a prefix for the message to the Group. If not provided, there will be nothing shown.
CARGO_REPRESENTABLE Constructor.
Defined in:
Parameters:
Wrapper.Positionable#POSITIONABLE CargoObject
The cargo object.
#string Type
Type name
#string Name
Name.
#number LoadRadius
(optional) Radius in meters.
#number NearRadius
(optional) Radius in meters when the cargo is loaded into the carrier.
Return value:
Route a cargo unit to a PointVec2.