Module Cargo

Core -- Management of CARGO logistics, that can be transported from and to transportation carriers.


Banner Image


This module is still under construction, but is described above works already, and will keep working ...


Author: FlightControl

Contributions:


Global(s)

CARGO

(R2.4) CARGO class, extends Fsm#FSM_PROCESS

The CARGO class defines the core functions that defines a cargo object within MOOSE.

CARGOS
CARGO_PACKAGE
CARGO_REPORTABLE
CARGO_REPRESENTABLE

Models CARGO that is representable by a Unit.

Type CARGO

CARGO:Board(ToCarrier, NearRadius)

Boards the cargo to a Carrier.

CARGO:CanBoard()

Check if the cargo can be Boarded.

CARGO:CanLoad()

Check if the cargo can be Loaded.

CARGO:CanSlingload()

Check if the cargo can be Slingloaded.

CARGO:CanUnboard()

Check if the cargo can be Unboarded.

CARGO:CanUnload()

Check if the cargo can be Unloaded.

CARGO.CargoCarrier

The alive DCS object carrying the cargo. This value can be nil, meaning, that the cargo is not contained anywhere...

CARGO.CargoLimit
CARGO.CargoObject

The alive DCS object representing the cargo. This value can be nil, meaning, that the cargo is not represented anywhere...

CARGO.CargoScheduler
CARGO.Containable

This flag defines if the cargo can be contained within a DCS Unit.

CARGO.Deployed
CARGO:Destroy()

Destroy the cargo.

CARGO:FindByName(CargoName)

Find a CARGO in the _DATABASE.

CARGO:Flare(FlareColor)

Signal a flare at the position of the CARGO.

CARGO:FlareGreen()

Signal a green flare at the position of the CARGO.

CARGO:FlareRed()

Signal a red flare at the position of the CARGO.

CARGO:FlareWhite()

Signal a white flare at the position of the CARGO.

CARGO:FlareYellow()

Signal a yellow flare at the position of the CARGO.

CARGO:GetCoalition()

Get the coalition of the Cargo.

CARGO:GetCoordinate()

Get the current coordinates of the Cargo.

CARGO:GetCount()

Get the amount of Cargo.

CARGO:GetHeading()

Get the heading of the cargo.

CARGO:GetLoadRadius()

Get the Load radius, which is the radius till when the Cargo can be loaded.

CARGO:GetName()

Get the name of the Cargo.

CARGO:GetObject()

Get the current active object representing or being the Cargo.

CARGO:GetObjectName()

Get the object name of the Cargo.

CARGO:GetPointVec2()

Get the current PointVec2 of the cargo.

CARGO:GetTransportationMethod()

Get the transportation method of the Cargo.

CARGO:GetType()

Get the type of the Cargo.

CARGO:GetX()

Get the x position of the cargo.

CARGO:GetY()

Get the y position of the cargo.

CARGO:IsAlive()

Check if cargo is alive.

CARGO:IsBoarding()

Check if cargo is boarding.

CARGO:IsDeployed()

Is the cargo deployed

CARGO:IsDestroyed()

Check if cargo is destroyed.

CARGO:IsInLoadRadius(Coordinate)

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

CARGO:IsInReportRadius(Coordinate)

Check if the Cargo can report itself to be Boarded or Loaded.

CARGO:IsInZone(Zone)

Check if Cargo is the given Zone.

CARGO:IsLoaded()

Check if cargo is loaded.

CARGO:IsLoadedInCarrier(Carrier)

Check if cargo is loaded.

CARGO:IsNear(Coordinate, NearRadius)

Check if CargoCarrier is near the Cargo to be Loaded.

CARGO:IsUnLoaded()

Check if cargo is unloaded.

CARGO:IsUnboarding()

Check if cargo is unboarding.

CARGO:Load(ToCarrier)

Loads the cargo to a Carrier.

CARGO.LoadRadius
CARGO:MessageToGroup(Message, CarrierGroup, Name)

Send a CC message to a Group.

CARGO.Moveable

This flag defines if the cargo is moveable.

CARGO.Name

A string defining the name of the cargo. The name is the unique identifier of the cargo.

CARGO.NearRadius

(optional) A number defining the radius in meters when the cargo is near to a Carrier, so that it can be loaded.

CARGO:New(Type, Name, Weight, LoadRadius, NearRadius)

CARGO Constructor.

CARGO:OnEnterBoarding(Controllable, NearRadius)
CARGO:OnEnterLoaded(Controllable)
CARGO:OnEnterUnBoarding(Controllable)
CARGO:OnEnterUnLoaded(Controllable)
CARGO:OnLeaveBoarding(Controllable)
CARGO:OnLeaveLoaded(Controllable)
CARGO:OnLeaveUnBoarding(Controllable)
CARGO:OnLeaveUnLoaded(Controllable)
CARGO:Report(Action, CarrierGroup, ReportText)

Report to a Carrier Group.

CARGO:ReportFlare(FlareColor)

Report to a Carrier Group with a Flaring signal.

CARGO.ReportFlareColor
CARGO:ReportReset(Action, CarrierGroup)

Reset the reporting for a Carrier Group.

CARGO:ReportResetAll(CarrierGroup)

Reset all the reporting for a Carrier Group.

CARGO:ReportSmoke(SmokeColor)

Report to a Carrier Group with a Smoking signal.

CARGO.ReportSmokeColor
CARGO.Representable

This flag defines if the cargo can be represented by a DCS Unit.

CARGO:RespawnOnDestroyed(RespawnDestroyed)

Respawn the cargo when destroyed

CARGO:SetDeployed(Deployed)

Set the cargo as deployed.

CARGO:SetLoadRadius(LoadRadius)

Set the Load radius, which is the radius till when the Cargo can be loaded.

CARGO:SetWeight(Weight)

Set the weight of the cargo.

CARGO.Slingloadable

This flag defines if the cargo can be slingloaded.

CARGO:Smoke(SmokeColor, Radius)

Smoke the CARGO.

CARGO:SmokeBlue()

Smoke the CARGO Blue.

CARGO:SmokeGreen()

Smoke the CARGO Green.

CARGO:SmokeOrange()

Smoke the CARGO Orange.

CARGO:SmokeRed()

Smoke the CARGO Red.

CARGO:SmokeWhite()

Smoke the CARGO White.

CARGO:Spawn(PointVec2)

Template method to spawn a new representation of the CARGO in the simulator.

CARGO.Type

A string defining the type of the cargo. eg. Engineers, Equipment, Screwdrivers.

CARGO:UnBoard(ToPointVec2)

UnBoards the cargo to a Carrier.

CARGO:UnLoad(ToPointVec2)

UnLoads the cargo to a Carrier.

CARGO.Weight

A number defining the weight of the cargo. The weight is expressed in kg.

CARGO:__Board(DelaySeconds, ToCarrier, NearRadius)

Boards the cargo to a Carrier.

CARGO:__Load(DelaySeconds, ToCarrier)

Loads the cargo to a Carrier.

CARGO:__UnBoard(DelaySeconds, ToPointVec2)

UnBoards the cargo to a Carrier.

CARGO:__UnLoad(DelaySeconds, ToPointVec2)

UnLoads the cargo to a Carrier.

CARGO:onenterDestroyed()

Type CARGO_PACKAGE

CARGO_PACKAGE.CargoCarrier
CARGO_PACKAGE.CargoInAir
CARGO_PACKAGE.ClassName
CARGO_PACKAGE:IsNear(CargoCarrier)

Check if CargoCarrier is near the Cargo to be Loaded.

CARGO_PACKAGE:New(CargoCarrier, Type, Name, Weight, LoadRadius, NearRadius)

CARGO_PACKAGE Constructor.

CARGO_PACKAGE:onafterLoad(Event, From, To, CargoCarrier, Speed, LoadDistance, Angle)

Load Event.

CARGO_PACKAGE:onafterOnBoard(Event, From, To, CargoCarrier, Speed, BoardDistance, Angle, LoadDistance)

Board Event.

CARGO_PACKAGE:onafterOnBoarded(Event, From, To, CargoCarrier, Speed, BoardDistance, LoadDistance, Angle)

Boarded Event.

CARGO_PACKAGE:onafterUnBoard(Event, From, To, Speed, UnLoadDistance, UnBoardDistance, Radius, Angle, CargoCarrier)

UnBoard Event.

CARGO_PACKAGE:onafterUnBoarded(Event, From, To, CargoCarrier, Speed)

UnBoarded Event.

CARGO_PACKAGE:onafterUnLoad(Event, From, To, Distance, Angle, CargoCarrier, Speed)

UnLoad Event.

Type CARGO_REPORTABLE

CARGO_REPORTABLE.ClassName
CARGO_REPORTABLE:MessageToGroup(Message, TaskGroup, Name)

Send a CC message to a Group.

CARGO_REPORTABLE:New(Type, Name, Weight, LoadRadius, NearRadius)

CARGO_REPORTABLE Constructor.

Type CARGO_REPRESENTABLE

CARGO_REPRESENTABLE:Destroy()

CARGO_REPRESENTABLE Destructor.

CARGO_REPRESENTABLE:MessageToGroup(Message, TaskGroup, Name)

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

CARGO_REPRESENTABLE:New(Type, Name, Weight, LoadRadius, NearRadius, CargoObject)

CARGO_REPRESENTABLE Constructor.

CARGO_REPRESENTABLE:RouteTo(ToPointVec2, Speed)

Route a cargo unit to a PointVec2.

CARGO_REPRESENTABLE.test

Global(s)

#CARGO CARGO

(R2.4) CARGO class, extends Fsm#FSM_PROCESS

The CARGO class defines the core functions that defines a cargo object within MOOSE.

A cargo is a logical object defined that is available for transport, and has a life status within a simulation.

CARGO is not meant to be used directly by mission designers, but provides a base class for concrete cargo implementation classes to handle:

The above cargo classes are used by the AI_CARGO_ classes to allow AI groups to transport cargo:

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

The CARGO is a state machine: it manages the different events and states of the cargo. All derived classes from CARGO follow the same state machine, expose the same cargo event functions, and provide the same cargo states.

CARGO Events:

  • CARGO.Board( ToCarrier ): Boards the cargo to a carrier.
  • CARGO.Load( ToCarrier ): Loads the cargo into a carrier, regardless of its position.
  • CARGO.UnBoard( ToPointVec2 ): UnBoard the cargo from a carrier. This will trigger a movement of the cargo to the option ToPointVec2.
  • CARGO.UnLoad( ToPointVec2 ): UnLoads the cargo from a carrier.
  • CARGO.Destroyed( Controllable ): The cargo is dead. The cargo process will be ended.
#table CARGOS
#CARGO_PACKAGE CARGO_PACKAGE
#CARGO_REPORTABLE CARGO_REPORTABLE
#CARGO_REPRESENTABLE CARGO_REPRESENTABLE

Models CARGO that is representable by a Unit.

Type Cargo

Type CARGO

Extends Core.Fsm#FSM_PROCESS

Field(s)

CARGO:Board(ToCarrier, NearRadius)

Boards the cargo to a Carrier.

The event will create a movement (= running or driving) of the cargo to the Carrier. The cargo must be in the UnLoaded state.

Parameters

  • Wrapper.Controllable#CONTROLLABLE ToCarrier : The Carrier that will hold the cargo.

  • #number NearRadius : The radius when the cargo will board the Carrier (to avoid collision).

CARGO:CanBoard()

Check if the cargo can be Boarded.

CARGO:CanLoad()

Check if the cargo can be Loaded.

CARGO:CanSlingload()

Check if the cargo can be Slingloaded.

CARGO:CanUnboard()

Check if the cargo can be Unboarded.

CARGO:CanUnload()

Check if the cargo can be Unloaded.

Wrapper.Client#CLIENT CARGO.CargoCarrier

The alive DCS object carrying the cargo. This value can be nil, meaning, that the cargo is not contained anywhere...

#number CARGO.CargoLimit
Wrapper.Unit#UNIT CARGO.CargoObject

The alive DCS object representing the cargo. This value can be nil, meaning, that the cargo is not represented anywhere...

CARGO.CargoScheduler
#boolean CARGO.Containable

This flag defines if the cargo can be contained within a DCS Unit.

CARGO.Deployed
CARGO:Destroy()

Destroy the cargo.

CARGO:FindByName(CargoName)

Find a CARGO in the _DATABASE.

Parameter

  • #string CargoName : The Cargo Name.

Return value

#CARGO: self

CARGO:Flare(FlareColor)

Signal a flare at the position of the CARGO.

Parameter

CARGO:FlareGreen()

Signal a green flare at the position of the CARGO.

CARGO:FlareRed()

Signal a red flare at the position of the CARGO.

CARGO:FlareWhite()

Signal a white flare at the position of the CARGO.

CARGO:FlareYellow()

Signal a yellow flare at the position of the CARGO.

CARGO:GetCoalition()

Get the coalition of the Cargo.

Return value

Coalition

CARGO:GetCoordinate()

Get the current coordinates of the Cargo.

Return value

Core.Point#COORDINATE: The coordinates of the Cargo.

CARGO:GetCount()

Get the amount of Cargo.

Return value

#number: The amount of Cargo.

CARGO:GetHeading()

Get the heading of the cargo.

Return value

#number:

CARGO:GetLoadRadius()

Get the Load radius, which is the radius till when the Cargo can be loaded.

Return value

#number: The radius till Cargo can be loaded.

CARGO:GetName()

Get the name of the Cargo.

Return value

#string: The name of the Cargo.

CARGO:GetObject()

Get the current active object representing or being the Cargo.

Return value

Wrapper.Positionable#POSITIONABLE: The object representing or being the Cargo.

CARGO:GetObjectName()

Get the object name of the Cargo.

Return value

#string: The object name of the Cargo.

CARGO:GetPointVec2()

Get the current PointVec2 of the cargo.

Return value

Core.Point#POINT_VEC2:

CARGO:GetTransportationMethod()

Get the transportation method of the Cargo.

Return value

#string: The transportation method of the Cargo.

CARGO:GetType()

Get the type of the Cargo.

Return value

#string: The type of the Cargo.

CARGO:GetX()

Get the x position of the cargo.

Return value

#number:

CARGO:GetY()

Get the y position of the cargo.

Return value

#number:

CARGO:IsAlive()

Check if cargo is alive.

Return value

#boolean: true if unloaded

CARGO:IsBoarding()

Check if cargo is boarding.

Return value

#boolean: true if boarding

CARGO:IsDeployed()

Is the cargo deployed

Return value

#boolean:

CARGO:IsDestroyed()

Check if cargo is destroyed.

Return value

#boolean: true if destroyed

CARGO:IsInLoadRadius(Coordinate)

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

Parameter

Return value

#boolean: true if the CargoGroup is within the loading radius.

CARGO:IsInReportRadius(Coordinate)

Check if the Cargo can report itself to be Boarded or Loaded.

Parameter

Return value

#boolean: true if the Cargo can report itself.

CARGO:IsInZone(Zone)

Check if Cargo is the given Zone.

Parameter

Return value

#boolean: true if cargo is in the Zone, false if cargo is not in the Zone.

CARGO:IsLoaded()

Check if cargo is loaded.

Return value

#boolean: true if loaded

CARGO:IsLoadedInCarrier(Carrier)

Check if cargo is loaded.

Parameter

Return value

#boolean: true if loaded

CARGO:IsNear(Coordinate, NearRadius)

Check if CargoCarrier is near the Cargo to be Loaded.

Parameters

  • Core.Point#COORDINATE Coordinate :

  • #number NearRadius : The radius when the cargo will board the Carrier (to avoid collision).

Return value

#boolean:

CARGO:IsUnLoaded()

Check if cargo is unloaded.

Return value

#boolean: true if unloaded

CARGO:IsUnboarding()

Check if cargo is unboarding.

Return value

#boolean: true if unboarding

CARGO:Load(ToCarrier)

Loads the cargo to a Carrier.

The event will load the cargo into the Carrier regardless of its position. There will be no movement simulated of the cargo loading. The cargo must be in the UnLoaded state.

Parameter

CARGO.LoadRadius
CARGO:MessageToGroup(Message, CarrierGroup, Name)

Send a CC message to a Group.

Parameters

  • #string Message :

  • Wrapper.Group#GROUP CarrierGroup : The Carrier Group.

  • #sring 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.

#boolean CARGO.Moveable

This flag defines if the cargo is moveable.

#string CARGO.Name

A string defining the name of the cargo. The name is the unique identifier of the cargo.

#number CARGO.NearRadius

(optional) A number defining the radius in meters when the cargo is near to a Carrier, so that it can be loaded.

CARGO:New(Type, Name, Weight, LoadRadius, NearRadius)

CARGO Constructor.

This class is an abstract class and should not be instantiated.

Parameters

  • #string Type :

  • #string Name :

  • #number Weight :

  • #number LoadRadius : (optional)

  • #number NearRadius : (optional)

Return value

#CARGO:

CARGO:OnEnterBoarding(Controllable, NearRadius)

Parameters

CARGO:OnEnterLoaded(Controllable)

Parameter

CARGO:OnEnterUnBoarding(Controllable)

Parameter

CARGO:OnEnterUnLoaded(Controllable)

Parameter

CARGO:OnLeaveBoarding(Controllable)

Parameter

Return value

#boolean:

CARGO:OnLeaveLoaded(Controllable)

Parameter

Return value

#boolean:

CARGO:OnLeaveUnBoarding(Controllable)

Parameter

Return value

#boolean:

CARGO:OnLeaveUnLoaded(Controllable)

Parameter

Return value

#boolean:

CARGO:Report(Action, CarrierGroup, ReportText)

Report to a Carrier Group.

Parameters

  • #string Action : The string describing the action for the cargo.

  • Wrapper.Group#GROUP CarrierGroup : The Carrier Group to send the report to.

  • ReportText :

Return value

#CARGO:

CARGO:ReportFlare(FlareColor)

Report to a Carrier Group with a Flaring signal.

Parameter

Return value

#CARGO:

CARGO.ReportFlareColor
CARGO:ReportReset(Action, CarrierGroup)

Reset the reporting for a Carrier Group.

Parameters

  • #string Action : The string describing the action for the cargo.

  • Wrapper.Group#GROUP CarrierGroup : The Carrier Group to send the report to.

Return value

#CARGO:

CARGO:ReportResetAll(CarrierGroup)

Reset all the reporting for a Carrier Group.

Parameter

Return value

#CARGO:

CARGO:ReportSmoke(SmokeColor)

Report to a Carrier Group with a Smoking signal.

Parameter

Return value

#CARGO:

CARGO.ReportSmokeColor
#boolean CARGO.Representable

This flag defines if the cargo can be represented by a DCS Unit.

CARGO:RespawnOnDestroyed(RespawnDestroyed)

Respawn the cargo when destroyed

Parameter

  • #boolean RespawnDestroyed :

CARGO:SetDeployed(Deployed)

Set the cargo as deployed.

Parameter

  • #boolean Deployed : true if the cargo is to be deployed. false or nil otherwise.

CARGO:SetLoadRadius(LoadRadius)

Set the Load radius, which is the radius till when the Cargo can be loaded.

Parameter

  • #number LoadRadius : The radius till Cargo can be loaded.

Return value

#CARGO:

CARGO:SetWeight(Weight)

Set the weight of the cargo.

Parameter

  • #number Weight : The weight in kg.

Return value

#CARGO:

#boolean CARGO.Slingloadable

This flag defines if the cargo can be slingloaded.

CARGO:Smoke(SmokeColor, Radius)

Smoke the CARGO.

Parameters

  • Utilities.Utils#SMOKECOLOR SmokeColor : The color of the smoke.

  • #number Radius : The radius of randomization around the center of the Cargo.

CARGO:SmokeBlue()

Smoke the CARGO Blue.

CARGO:SmokeGreen()

Smoke the CARGO Green.

CARGO:SmokeOrange()

Smoke the CARGO Orange.

CARGO:SmokeRed()

Smoke the CARGO Red.

CARGO:SmokeWhite()

Smoke the CARGO White.

CARGO:Spawn(PointVec2)

Template method to spawn a new representation of the CARGO in the simulator.

Parameter

  • PointVec2 :

Return value

#CARGO:

#string CARGO.Type

A string defining the type of the cargo. eg. Engineers, Equipment, Screwdrivers.

CARGO:UnBoard(ToPointVec2)

UnBoards the cargo to a Carrier.

The event will create a movement (= running or driving) of the cargo from the Carrier. The cargo must be in the Loaded state.

Parameter

  • Core.Point#POINT_VEC2 ToPointVec2 : (optional) @{Point#POINT_VEC2) to where the cargo should run after onboarding. If not provided, the cargo will run to 60 meters behind the Carrier location.

CARGO:UnLoad(ToPointVec2)

UnLoads the cargo to a Carrier.

The event will unload the cargo from the Carrier. There will be no movement simulated of the cargo loading. The cargo must be in the Loaded state.

Parameter

  • Core.Point#POINT_VEC2 ToPointVec2 : (optional) @{Point#POINT_VEC2) to where the cargo will be placed after unloading. If not provided, the cargo will be placed 60 meters behind the Carrier location.

#number CARGO.Weight

A number defining the weight of the cargo. The weight is expressed in kg.

CARGO:__Board(DelaySeconds, ToCarrier, NearRadius)

Boards the cargo to a Carrier.

The event will create a movement (= running or driving) of the cargo to the Carrier. The cargo must be in the UnLoaded state.

Parameters

  • #number DelaySeconds : The amount of seconds to delay the action.

  • Wrapper.Controllable#CONTROLLABLE ToCarrier : The Carrier that will hold the cargo.

  • #number NearRadius : The radius when the cargo will board the Carrier (to avoid collision).

CARGO:__Load(DelaySeconds, ToCarrier)

Loads the cargo to a Carrier.

The event will load the cargo into the Carrier regardless of its position. There will be no movement simulated of the cargo loading. The cargo must be in the UnLoaded state.

Parameters

CARGO:__UnBoard(DelaySeconds, ToPointVec2)

UnBoards the cargo to a Carrier.

The event will create a movement (= running or driving) of the cargo from the Carrier. The cargo must be in the Loaded state.

Parameters

  • #number DelaySeconds : The amount of seconds to delay the action.

  • Core.Point#POINT_VEC2 ToPointVec2 : (optional) @{Point#POINT_VEC2) to where the cargo should run after onboarding. If not provided, the cargo will run to 60 meters behind the Carrier location.

CARGO:__UnLoad(DelaySeconds, ToPointVec2)

UnLoads the cargo to a Carrier.

The event will unload the cargo from the Carrier. There will be no movement simulated of the cargo loading. The cargo must be in the Loaded state.

Parameters

  • #number DelaySeconds : The amount of seconds to delay the action.

  • Core.Point#POINT_VEC2 ToPointVec2 : (optional) @{Point#POINT_VEC2) to where the cargo will be placed after unloading. If not provided, the cargo will be placed 60 meters behind the Carrier location.

CARGO:onenterDestroyed()

Type CARGO.CargoObjects

CARGO.CargoObjects is a map of #string to Wrapper.Positionable#POSITIONABLE. The alive POSITIONABLE objects representing the the cargo.

Type CARGO_PACKAGE

Extends #CARGO_REPRESENTABLE

Field(s)

CARGO_PACKAGE.CargoCarrier
CARGO_PACKAGE.CargoInAir
#string CARGO_PACKAGE.ClassName
CARGO_PACKAGE:IsNear(CargoCarrier)

Check if CargoCarrier is near the Cargo to be Loaded.

Parameter

Return value

#boolean:

CARGO_PACKAGE:New(CargoCarrier, Type, Name, Weight, LoadRadius, NearRadius)

CARGO_PACKAGE Constructor.

Parameters

  • Wrapper.Unit#UNIT CargoCarrier : The UNIT carrying the package.

  • #string Type :

  • #string Name :

  • #number Weight :

  • #number LoadRadius : (optional)

  • #number NearRadius : (optional)

Return value

#CARGO_PACKAGE:

CARGO_PACKAGE:onafterLoad(Event, From, To, CargoCarrier, Speed, LoadDistance, Angle)

Load Event.

Parameters

  • #string Event :

  • #string From :

  • #string To :

  • Wrapper.Unit#UNIT CargoCarrier :

  • #number Speed :

  • #number LoadDistance :

  • #number Angle :

CARGO_PACKAGE:onafterOnBoard(Event, From, To, CargoCarrier, Speed, BoardDistance, Angle, LoadDistance)

Board Event.

Parameters

  • #string Event :

  • #string From :

  • #string To :

  • Wrapper.Unit#UNIT CargoCarrier :

  • #number Speed :

  • #number BoardDistance :

  • #number Angle :

  • LoadDistance :

CARGO_PACKAGE:onafterOnBoarded(Event, From, To, CargoCarrier, Speed, BoardDistance, LoadDistance, Angle)

Boarded Event.

Parameters

  • #string Event :

  • #string From :

  • #string To :

  • Wrapper.Unit#UNIT CargoCarrier :

  • Speed :

  • BoardDistance :

  • LoadDistance :

  • Angle :

CARGO_PACKAGE:onafterUnBoard(Event, From, To, Speed, UnLoadDistance, UnBoardDistance, Radius, Angle, CargoCarrier)

UnBoard Event.

Parameters

  • #string Event :

  • #string From :

  • #string To :

  • #number Speed :

  • #number UnLoadDistance :

  • #number UnBoardDistance :

  • #number Radius :

  • #number Angle :

  • CargoCarrier :

CARGO_PACKAGE:onafterUnBoarded(Event, From, To, CargoCarrier, Speed)

UnBoarded Event.

Parameters

  • #string Event :

  • #string From :

  • #string To :

  • Wrapper.Unit#UNIT CargoCarrier :

  • Speed :

CARGO_PACKAGE:onafterUnLoad(Event, From, To, Distance, Angle, CargoCarrier, Speed)

UnLoad Event.

Parameters

  • #string Event :

  • #string From :

  • #string To :

  • #number Distance :

  • #number Angle :

  • CargoCarrier :

  • Speed :

Type CARGO_REPORTABLE

Extends #CARGO

Field(s)

#string CARGO_REPORTABLE.ClassName
CARGO_REPORTABLE:MessageToGroup(Message, TaskGroup, Name)

Send a CC message to a Group.

Parameters

  • #string Message :

  • Wrapper.Group#GROUP TaskGroup :

  • #sring 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_REPORTABLE:New(Type, Name, Weight, LoadRadius, NearRadius)

CARGO_REPORTABLE Constructor.

Parameters

  • #string Type :

  • #string Name :

  • #number Weight :

  • #number LoadRadius : (optional)

  • #number NearRadius : (optional)

Return value

#CARGO_REPORTABLE:

Type CARGO_REPRESENTABLE

Extends #CARGO

Field(s)

CARGO_REPRESENTABLE:Destroy()

CARGO_REPRESENTABLE Destructor.

Return value

#CARGO_REPRESENTABLE:

CARGO_REPRESENTABLE:MessageToGroup(Message, TaskGroup, Name)

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

Parameters

  • #string Message :

  • Wrapper.Group#GROUP TaskGroup :

  • #sring 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:New(Type, Name, Weight, LoadRadius, NearRadius, CargoObject)

CARGO_REPRESENTABLE Constructor.

Parameters

  • #string Type :

  • #string Name :

  • #number Weight :

  • #number LoadRadius : (optional)

  • #number NearRadius : (optional)

  • CargoObject :

Return value

#CARGO_REPRESENTABLE:

CARGO_REPRESENTABLE:RouteTo(ToPointVec2, Speed)

Route a cargo unit to a PointVec2.

Parameters

Return value

#CARGO_REPRESENTABLE:

CARGO_REPRESENTABLE.test

Type sring