Banner Image

Module Cargo.CargoSlingload

Cargo - Management of single cargo crates, which are based on a STATIC object.

The cargo can only be slingloaded.


Demo Missions

YouTube Playlist


Author: FlightControl

Contributions:


Global(s)

Global CARGO_SLINGLOAD

Defines a cargo that is represented by a UNIT object within the simulator, and can be transported by a carrier.

#CARGO_SLINGLOAD CARGO_SLINGLOAD

Defines a cargo that is represented by a UNIT object within the simulator, and can be transported by a carrier.

The above cargo classes are also used by the TASK_CARGO_ classes to allow human players to transport cargo as part of a tasking:


Type(s)

Fields and Methods inherited from CARGO_SLINGLOAD Description

CARGO_SLINGLOAD:CanBoard()

Check if the cargo can be Boarded.

CARGO_SLINGLOAD:CanLoad()

Check if the cargo can be Loaded.

CARGO_SLINGLOAD:CanSlingload()

Check if the cargo can be Slingloaded.

CARGO_SLINGLOAD:CanUnboard()

Check if the cargo can be Unboarded.

CARGO_SLINGLOAD:CanUnload()

Check if the cargo can be Unloaded.

CARGO_SLINGLOAD.CargoCarrier

CARGO_SLINGLOAD.CargoObject

CARGO_SLINGLOAD:GetCoordinate()

Get the current Coordinate of the CargoGroup.

CARGO_SLINGLOAD:GetTransportationMethod()

Get the transportation method of the Cargo.

CARGO_SLINGLOAD:IsAlive()

Check if the CargoGroup is alive.

CARGO_SLINGLOAD:IsInLoadRadius(Coordinate)

Check if Cargo Slingload is in the radius for the Cargo to be Boarded or Loaded.

CARGO_SLINGLOAD:IsInReportRadius(Coordinate)

Check if Cargo Crate is in the radius for the Cargo to be reported.

CARGO_SLINGLOAD:IsNear(CargoCarrier, NearRadius)

Check if Cargo is near to the Carrier.

CARGO_SLINGLOAD.NearRadius

CARGO_SLINGLOAD:New(CargoStatic, Type, Name, LoadRadius, NearRadius)

CARGO_SLINGLOAD Constructor.

CARGO_SLINGLOAD:OnEventCargoDead(EventData)

CARGO_SLINGLOAD:Respawn()

Respawn the CargoGroup.

CARGO_SLINGLOAD:RouteTo(Coordinate)

Route Cargo to Coordinate and randomize locations.

CARGO_SLINGLOAD:onafterReset()

Respawn the CargoGroup.

Fields and Methods inherited from CARGO_REPRESENTABLE Description

CARGO_SLINGLOAD:Destroy()

CARGO_REPRESENTABLE Destructor.

CARGO_SLINGLOAD:MessageToGroup(Message, TaskGroup, Name)

Send a message to a Wrapper.Group through a communication channel near the cargo.

CARGO_SLINGLOAD:New(CargoObject, Type, Name, LoadRadius, NearRadius)

CARGO_REPRESENTABLE Constructor.

CARGO_SLINGLOAD:RouteTo(ToPointVec2, Speed)

Route a cargo unit to a PointVec2.

CARGO_SLINGLOAD.test

Models the behaviour of cargo crates, which can only be slingloaded.

Field(s)

Function(s)

Check if the cargo can be Boarded.

Defined in:

CARGO_SLINGLOAD

Check if the cargo can be Loaded.

Defined in:

CARGO_SLINGLOAD

Check if the cargo can be Slingloaded.

Defined in:

CARGO_SLINGLOAD

Check if the cargo can be Unboarded.

Defined in:

CARGO_SLINGLOAD

Check if the cargo can be Unloaded.

Defined in:

CARGO_SLINGLOAD

Get the current Coordinate of the CargoGroup.

Defined in:

CARGO_SLINGLOAD

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_SLINGLOAD

Return value:

#string:

The transportation method of the Cargo.

Check if the CargoGroup is alive.

Defined in:

CARGO_SLINGLOAD

Return values:

#boolean:

true if the CargoGroup is alive.

#boolean:

false if the CargoGroup is dead.

Check if Cargo Slingload is in the radius for the Cargo to be Boarded or Loaded.

Defined in:

CARGO_SLINGLOAD

Parameter:

Return value:

#boolean:

true if the Cargo Slingload is within the loading radius.

Check if Cargo Crate is in the radius for the Cargo to be reported.

Defined in:

CARGO_SLINGLOAD

Parameter:

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_SLINGLOAD

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_SLINGLOAD Constructor.

Defined in:

CARGO_SLINGLOAD

Parameters:

Wrapper.Static#STATIC CargoStatic

#string Type

#string Name

#number LoadRadius

(optional)

#number NearRadius

(optional)

Return value:

Defined in:

CARGO_SLINGLOAD

Parameter:

Respawn the CargoGroup.

Defined in:

CARGO_SLINGLOAD

Route Cargo to Coordinate and randomize locations.

Defined in:

CARGO_SLINGLOAD

Parameter:

Respawn the CargoGroup.

Defined in:

CARGO_SLINGLOAD

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

#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:

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.

Defined in:

Parameters:

Core.Point#POINT_VEC2 ToPointVec2

#number Speed

Return value: