mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Progress
This commit is contained in:
parent
e1610330f4
commit
92f1f08d5f
@ -79,43 +79,14 @@ do -- CARGO
|
|||||||
self.Moveable = false
|
self.Moveable = false
|
||||||
self.Containable = false
|
self.Containable = false
|
||||||
|
|
||||||
local Process = STATEMACHINE_PROCESS:New( self, {
|
|
||||||
initial = 'UnLoaded',
|
|
||||||
events = {
|
|
||||||
{ name = 'Board', from = 'UnLoaded', to = 'Boarding' },
|
|
||||||
{ name = 'Boarded', from = 'Boarding', to = 'Boarding' },
|
|
||||||
{ name = 'Load', from = 'Boarding', to = 'Loaded' },
|
|
||||||
{ name = 'Load', from = 'UnLoaded', to = 'Loaded' },
|
|
||||||
{ name = 'UnBoard', from = 'Loaded', to = 'UnBoarding' },
|
|
||||||
{ name = 'UnBoard', from = 'UnBoarding', to = 'UnBoarding' },
|
|
||||||
{ name = 'UnBoarded', from = 'UnBoarding', to = 'UnLoaded' },
|
|
||||||
{ name = 'UnLoad', from = 'Loaded', to = 'UnLoaded' },
|
|
||||||
},
|
|
||||||
callbacks = {
|
|
||||||
OnBoard = self.Board,
|
|
||||||
OnBoarded = self.OnBoarded,
|
|
||||||
OnLoad = self.Load,
|
|
||||||
OnUnBoard = self.UnBoard,
|
|
||||||
OnUnBoarded = self.UnBoarded,
|
|
||||||
OnUnLoad = self.UnLoad,
|
|
||||||
OnLoaded = self.Loaded,
|
|
||||||
OnUnLoaded = self.UnLoaded,
|
|
||||||
},
|
|
||||||
} )
|
|
||||||
|
|
||||||
self.CargoScheduler = SCHEDULER:New()
|
self.CargoScheduler = SCHEDULER:New()
|
||||||
|
|
||||||
CARGOS[self.CargoName] = self
|
CARGOS[self.Name] = self
|
||||||
|
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
--- @param #CARGO self
|
|
||||||
function CARGO:NextEvent( NextEvent, ... )
|
|
||||||
self:F( self.Name )
|
|
||||||
self.CargoScheduler:Schedule( self.Fsm, NextEvent, arg, 1 ) -- This schedules the next event, but only if scheduling is activated.
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
--- Template method to spawn a new representation of the CARGO in the simulator.
|
--- Template method to spawn a new representation of the CARGO in the simulator.
|
||||||
-- @param #CARGO self
|
-- @param #CARGO self
|
||||||
@ -125,62 +96,64 @@ do -- CARGO
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Load Event.
|
--- Board Cargo to a Carrier with a defined Speed.
|
||||||
-- @param #CARGO self
|
-- @param #CARGO self
|
||||||
-- @param StateMachine#STATEMACHINE_PROCESS FsmP
|
|
||||||
-- @param #string Event
|
|
||||||
-- @param #string From
|
|
||||||
-- @param #string To
|
|
||||||
-- @param Unit#UNIT CargoCarrier
|
-- @param Unit#UNIT CargoCarrier
|
||||||
function CARGO:Load( FsmP, Event, From, To, CargoCarrier )
|
-- @param #number Speed
|
||||||
|
function CARGO:Board( CargoCarrier, Speed )
|
||||||
self:F()
|
self:F()
|
||||||
|
|
||||||
|
self:_NextEvent( self.FsmP.Board, CargoCarrier, Speed )
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--- UnBoard Cargo from a Carrier with a defined Speed.
|
||||||
--- UnLoad Event.
|
|
||||||
-- @param #CARGO self
|
-- @param #CARGO self
|
||||||
-- @param StateMachine#STATEMACHINE_PROCESS FsmP
|
|
||||||
-- @param #string Event
|
|
||||||
-- @param #string From
|
|
||||||
-- @param #string To
|
|
||||||
function CARGO:UnLoad( FsmP, Event, From, To )
|
|
||||||
self:F()
|
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
--- Board Event.
|
|
||||||
-- @param #CARGO self
|
|
||||||
-- @param StateMachine#STATEMACHINE_PROCESS FsmP
|
|
||||||
-- @param #string Event
|
|
||||||
-- @param #string From
|
|
||||||
-- @param #string To
|
|
||||||
-- @param Unit#UNIT CargoCarrier
|
-- @param Unit#UNIT CargoCarrier
|
||||||
function CARGO:Board( FsmP, Event, From, To, CargoCarrier )
|
-- @param #number Speed
|
||||||
|
function CARGO:UnBoard( Speed )
|
||||||
self:F()
|
self:F()
|
||||||
|
|
||||||
|
self:_NextEvent( self.FsmP.UnBoard, Speed )
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Boarded Event.
|
--- Load Cargo to a Carrier.
|
||||||
-- @param #CARGO self
|
-- @param #CARGO self
|
||||||
-- @param StateMachine#STATEMACHINE_PROCESS FsmP
|
|
||||||
-- @param #string Event
|
|
||||||
-- @param #string From
|
|
||||||
-- @param #string To
|
|
||||||
-- @param Unit#UNIT CargoCarrier
|
-- @param Unit#UNIT CargoCarrier
|
||||||
function CARGO:Boarded( FsmP, Event, From, To, CargoCarrier )
|
-- @param #number Speed
|
||||||
|
function CARGO:Load( CargoCarrier )
|
||||||
self:F()
|
self:F()
|
||||||
|
|
||||||
|
self:_NextEvent( self.FsmP.Load, CargoCarrier )
|
||||||
|
end
|
||||||
|
|
||||||
|
--- UnLoad Cargo from a Carrier.
|
||||||
|
-- @param #CARGO self
|
||||||
|
-- @param Unit#UNIT CargoCarrier
|
||||||
|
-- @param #number Speed
|
||||||
|
function CARGO:UnLoad()
|
||||||
|
self:F()
|
||||||
|
|
||||||
|
self:_NextEvent( self.FsmP.UnLoad )
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function CARGO:IsNear( CargoCarrier, CargoObject, Radius )
|
--- Check if CargoCarrier is near the Cargo to be Loaded.
|
||||||
|
-- @param #CARGO self
|
||||||
|
-- @param Unit#UNIT CargoCarrier
|
||||||
|
-- @return #boolean
|
||||||
|
function CARGO:IsNear( CargoCarrier )
|
||||||
self:F()
|
self:F()
|
||||||
|
|
||||||
local Near = true
|
local CargoCarrierPoint = CargoCarrier:GetPointVec2()
|
||||||
|
|
||||||
return Near
|
local Distance = CargoCarrierPoint:DistanceFromPointVec2( self.CargoObject:GetPointVec2() )
|
||||||
|
self:T( Distance )
|
||||||
|
|
||||||
|
if Distance <= self.NearRadius then
|
||||||
|
return true
|
||||||
|
else
|
||||||
|
return false
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
@ -191,7 +164,7 @@ do -- CARGO
|
|||||||
-- @param #string From
|
-- @param #string From
|
||||||
-- @param #string To
|
-- @param #string To
|
||||||
-- @param Unit#UNIT CargoCarrier
|
-- @param Unit#UNIT CargoCarrier
|
||||||
function CARGO:Loaded( FsmP, Event, From, To, CargoCarrier )
|
function CARGO:OnLoaded( FsmP, Event, From, To, CargoCarrier )
|
||||||
self:F()
|
self:F()
|
||||||
|
|
||||||
self.CargoCarrier = CargoCarrier
|
self.CargoCarrier = CargoCarrier
|
||||||
@ -204,13 +177,19 @@ do -- CARGO
|
|||||||
-- @param #string Event
|
-- @param #string Event
|
||||||
-- @param #string From
|
-- @param #string From
|
||||||
-- @param #string To
|
-- @param #string To
|
||||||
function CARGO:StatusUnLoaded( FsmP, Event, From, To )
|
function CARGO:OnUnLoaded( FsmP, Event, From, To )
|
||||||
self:F()
|
self:F()
|
||||||
|
|
||||||
self:T( "Cargo " .. self.Name .. " unloaded from " .. self.CargoCarrier:GetName() )
|
self:T( "Cargo " .. self.Name .. " unloaded from " .. self.CargoCarrier:GetName() )
|
||||||
self.CargoCarrier = nil
|
self.CargoCarrier = nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--- @param #CARGO self
|
||||||
|
function CARGO:_NextEvent( NextEvent, ... )
|
||||||
|
self:F( self.Name )
|
||||||
|
self.CargoScheduler:Schedule( self.FsmP, NextEvent, arg, 1 ) -- This schedules the next event, but only if scheduling is activated.
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
do -- CARGO_REPRESENTABLE
|
do -- CARGO_REPRESENTABLE
|
||||||
@ -235,8 +214,34 @@ do -- CARGO_REPRESENTABLE
|
|||||||
local self = BASE:Inherit( self, CARGO:New( Mission, Type, Name, Weight, ReportRadius, NearRadius ) ) -- #CARGO
|
local self = BASE:Inherit( self, CARGO:New( Mission, Type, Name, Weight, ReportRadius, NearRadius ) ) -- #CARGO
|
||||||
self:F( { Type, Name, Weight, ReportRadius, NearRadius } )
|
self:F( { Type, Name, Weight, ReportRadius, NearRadius } )
|
||||||
|
|
||||||
|
self:T( CargoObject )
|
||||||
self.CargoObject = CargoObject
|
self.CargoObject = CargoObject
|
||||||
|
|
||||||
|
self.FsmP = STATEMACHINE_PROCESS:New( self, {
|
||||||
|
initial = 'UnLoaded',
|
||||||
|
events = {
|
||||||
|
{ name = 'Board', from = 'UnLoaded', to = 'Boarding' },
|
||||||
|
{ name = 'Boarded', from = 'Boarding', to = 'Boarding' },
|
||||||
|
{ name = 'Load', from = 'Boarding', to = 'Loaded' },
|
||||||
|
{ name = 'Load', from = 'UnLoaded', to = 'Loaded' },
|
||||||
|
{ name = 'UnBoard', from = 'Loaded', to = 'UnBoarding' },
|
||||||
|
{ name = 'UnBoarded', from = 'UnBoarding', to = 'UnBoarding' },
|
||||||
|
{ name = 'UnLoad', from = 'UnBoarding', to = 'UnLoaded' },
|
||||||
|
{ name = 'UnLoad', from = 'Loaded', to = 'UnLoaded' },
|
||||||
|
},
|
||||||
|
callbacks = {
|
||||||
|
onBoard = self.OnBoard,
|
||||||
|
onBoarded = self.OnBoarded,
|
||||||
|
onLoad = self.OnLoad,
|
||||||
|
onUnBoard = self.OnUnBoard,
|
||||||
|
onUnBoarded = self.OnUnBoarded,
|
||||||
|
onUnLoad = self.OnUnLoad,
|
||||||
|
onLoaded = self.OnLoaded,
|
||||||
|
onUnLoaded = self.OnUnLoaded,
|
||||||
|
},
|
||||||
|
} )
|
||||||
|
|
||||||
|
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -247,7 +252,7 @@ do -- CARGO_REPRESENTABLE
|
|||||||
-- @param #string From
|
-- @param #string From
|
||||||
-- @param #string To
|
-- @param #string To
|
||||||
-- @param Unit#UNIT CargoCarrier
|
-- @param Unit#UNIT CargoCarrier
|
||||||
function CARGO_REPRESENTABLE:Onboard( FsmP, Event, From, To, CargoCarrier )
|
function CARGO_REPRESENTABLE:OnBoard( FsmP, Event, From, To, CargoCarrier, Speed )
|
||||||
self:F()
|
self:F()
|
||||||
|
|
||||||
self.CargoInAir = self.CargoObject:InAir()
|
self.CargoInAir = self.CargoObject:InAir()
|
||||||
@ -261,17 +266,17 @@ do -- CARGO_REPRESENTABLE
|
|||||||
local Points = {}
|
local Points = {}
|
||||||
|
|
||||||
local PointStartVec2 = self.CargoObject:GetPointVec2()
|
local PointStartVec2 = self.CargoObject:GetPointVec2()
|
||||||
local PointEndVec2 = Carrier:GetPointVec2()
|
local PointEndVec2 = CargoCarrier:GetPointVec2()
|
||||||
|
|
||||||
|
|
||||||
Points[#Points+1] = PointStartVec2:RoutePointGround( "Cone", 10 )
|
Points[#Points+1] = PointStartVec2:RoutePointGround( Speed )
|
||||||
Points[#Points+1] = PointEndVec2:RoutePointGround( "Cone", 10 )
|
Points[#Points+1] = PointEndVec2:RoutePointGround( Speed )
|
||||||
|
|
||||||
local TaskRoute = self.CargoObject:TaskRoute( Points )
|
local TaskRoute = self.CargoObject:TaskRoute( Points )
|
||||||
self.CargoObject:SetTask( TaskRoute, 4 )
|
self.CargoObject:SetTask( TaskRoute, 4 )
|
||||||
end
|
end
|
||||||
|
|
||||||
self:NextEvent( FsmP.Boarded, CargoCarrier )
|
self:_NextEvent( FsmP.Boarded, CargoCarrier )
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -282,13 +287,30 @@ do -- CARGO_REPRESENTABLE
|
|||||||
-- @param #string From
|
-- @param #string From
|
||||||
-- @param #string To
|
-- @param #string To
|
||||||
-- @param Unit#UNIT CargoCarrier
|
-- @param Unit#UNIT CargoCarrier
|
||||||
function CARGO:Boarded( FsmP, Event, From, To, CargoCarrier )
|
function CARGO_REPRESENTABLE:OnBoarded( FsmP, Event, From, To, CargoCarrier )
|
||||||
self:F()
|
self:F()
|
||||||
|
|
||||||
if self:IsNear( CargoCarrier ) then
|
if self:IsNear( CargoCarrier ) then
|
||||||
self:NextEvent( FsmP.Boarded, CargoCarrier )
|
self:_NextEvent( FsmP.Load, CargoCarrier )
|
||||||
else
|
else
|
||||||
self:NextEvent( FsmP.Load, CargoCarrier )
|
self:_NextEvent( FsmP.Boarded, CargoCarrier )
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
--- UnBoarded Event.
|
||||||
|
-- @param #CARGO self
|
||||||
|
-- @param StateMachine#STATEMACHINE_PROCESS FsmP
|
||||||
|
-- @param #string Event
|
||||||
|
-- @param #string From
|
||||||
|
-- @param #string To
|
||||||
|
-- @param Unit#UNIT CargoCarrier
|
||||||
|
function CARGO_REPRESENTABLE:OnUnBoarded( FsmP, Event, From, To )
|
||||||
|
self:F()
|
||||||
|
|
||||||
|
if self.CargoObject:GetVelocityKMH() <= 0.1 then
|
||||||
|
self:_NextEvent( FsmP.UnLoad )
|
||||||
|
else
|
||||||
|
self:_NextEvent( FsmP.Boarded, CargoCarrier )
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -299,7 +321,7 @@ do -- CARGO_REPRESENTABLE
|
|||||||
-- @param #string From
|
-- @param #string From
|
||||||
-- @param #string To
|
-- @param #string To
|
||||||
-- @param Unit#UNIT CargoCarrier
|
-- @param Unit#UNIT CargoCarrier
|
||||||
function CARGO:Load( FsmP, Event, From, To, CargoCarrier )
|
function CARGO_REPRESENTABLE:OnLoad( FsmP, Event, From, To, CargoCarrier )
|
||||||
self:F()
|
self:F()
|
||||||
|
|
||||||
self.CargoCarrier = CargoCarrier
|
self.CargoCarrier = CargoCarrier
|
||||||
@ -591,31 +613,49 @@ function CARGO_SLINGLOAD:Spawn( Client )
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-- This does not work in 1.5.2.
|
-- This does not work in 1.5.2.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
CargoStatic = StaticObject.getByName( self.CargoName )
|
CargoStatic = StaticObject.getByName( self.CargoName )
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if CargoStatic then
|
if CargoStatic then
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
CargoStatic:destroy()
|
CargoStatic:destroy()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
--]]
|
--]]
|
||||||
|
|
||||||
CargoStatic = StaticObject.getByName( self.CargoStaticName )
|
CargoStatic = StaticObject.getByName( self.CargoStaticName )
|
||||||
@ -1028,3 +1068,6 @@ end
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -71,7 +71,7 @@ end
|
|||||||
--- Destroys the OBJECT.
|
--- Destroys the OBJECT.
|
||||||
-- @param #OBJECT self
|
-- @param #OBJECT self
|
||||||
-- @return #nil The DCS Unit is not existing or alive.
|
-- @return #nil The DCS Unit is not existing or alive.
|
||||||
function UNIT:Destroy()
|
function OBJECT:Destroy()
|
||||||
self:F2( self.ObjectName )
|
self:F2( self.ObjectName )
|
||||||
|
|
||||||
local DCSObject = self:GetDCSObject()
|
local DCSObject = self:GetDCSObject()
|
||||||
|
|||||||
@ -383,17 +383,18 @@ end
|
|||||||
|
|
||||||
--- Build an ground type route point.
|
--- Build an ground type route point.
|
||||||
-- @param #POINT_VEC3 self
|
-- @param #POINT_VEC3 self
|
||||||
-- @param #POINT_VEC3.RoutePointAction Formation The route point Formation.
|
|
||||||
-- @param DCSTypes#Speed Speed Speed in km/h.
|
-- @param DCSTypes#Speed Speed Speed in km/h.
|
||||||
|
-- @param #POINT_VEC3.RoutePointAction Formation The route point Formation.
|
||||||
-- @return #table The route point.
|
-- @return #table The route point.
|
||||||
function POINT_VEC3:RoutePointGround( Formation, Speed )
|
function POINT_VEC3:RoutePointGround( Speed, Formation )
|
||||||
self:F2( { Formation, Speed } )
|
self:F2( { Formation, Speed } )
|
||||||
|
|
||||||
local RoutePoint = {}
|
local RoutePoint = {}
|
||||||
RoutePoint.x = self.PointVec3.x
|
RoutePoint.x = self.PointVec3.x
|
||||||
RoutePoint.y = self.PointVec3.z
|
RoutePoint.y = self.PointVec3.z
|
||||||
|
|
||||||
RoutePoint.action = Formation
|
RoutePoint.action = Formation or ""
|
||||||
|
|
||||||
|
|
||||||
RoutePoint.speed = Speed / 3.6
|
RoutePoint.speed = Speed / 3.6
|
||||||
RoutePoint.speed_locked = true
|
RoutePoint.speed_locked = true
|
||||||
@ -555,6 +556,26 @@ function POINT_VEC2:NewFromVec2( Vec2, LandHeightAdd )
|
|||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--- Create a new POINT_VEC2 object from Vec3 coordinates.
|
||||||
|
-- @param #POINT_VEC2 self
|
||||||
|
-- @param DCSTypes#Vec3 Vec3 The Vec3 point.
|
||||||
|
-- @return Point#POINT_VEC2 self
|
||||||
|
function POINT_VEC2:NewFromVec3( Vec3 )
|
||||||
|
|
||||||
|
local self = BASE:Inherit( self, BASE:New() )
|
||||||
|
local Vec2 = { x = Vec3.x, y = Vec3.z }
|
||||||
|
|
||||||
|
local LandHeight = land.getHeight( Vec2 )
|
||||||
|
|
||||||
|
local self = BASE:Inherit( self, POINT_VEC3:New( Vec2.x, LandHeight, Vec2.y ) )
|
||||||
|
self:F2( { Vec2.x, LandHeight, Vec2.y } )
|
||||||
|
|
||||||
|
self.PointVec2 = Vec2
|
||||||
|
self:F2( self.PointVec3 )
|
||||||
|
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
--- Calculate the distance from a reference @{Point#POINT_VEC2}.
|
--- Calculate the distance from a reference @{Point#POINT_VEC2}.
|
||||||
-- @param #POINT_VEC2 self
|
-- @param #POINT_VEC2 self
|
||||||
-- @param #POINT_VEC2 PointVec2Reference The reference @{Point#POINT_VEC2}.
|
-- @param #POINT_VEC2 PointVec2Reference The reference @{Point#POINT_VEC2}.
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@ -0,0 +1,13 @@
|
|||||||
|
|
||||||
|
local Mission = MISSION:New( "Pickup Cargo", "High", "Test for Cargo Pickup", coalition.side.RED )
|
||||||
|
|
||||||
|
local CargoEngineer = UNIT:FindByName( "Engineer" )
|
||||||
|
local InfantryCargo = CARGO_UNIT:New( Mission, CargoEngineer, "Engineer", "Engineer Sven", "81", 2000, 25 )
|
||||||
|
|
||||||
|
local CargoCarrier = UNIT:FindByName( "Carrier" )
|
||||||
|
|
||||||
|
-- This call will make the Cargo run to the CargoCarrier.
|
||||||
|
-- Upon arrival at the CargoCarrier, the Cargo will be Loaded into the Carrier.
|
||||||
|
-- This process is now fully automated.
|
||||||
|
InfantryCargo:Board( CargoCarrier, 10 )
|
||||||
|
|
||||||
Binary file not shown.
@ -1,8 +0,0 @@
|
|||||||
|
|
||||||
local Mission = MISSION:New( "Pickup Cargo", "High", "Test for Cargo Pickup", coalition.side.RED )
|
|
||||||
|
|
||||||
local CargoEngineer = UNIT:FindByName( "Engineer" )
|
|
||||||
local InfantryCargo = CARGO_UNIT:New( Mission, CargoEngineer, "Engineer", "Engineer Sven", "81", 2000, 300 )
|
|
||||||
|
|
||||||
local CargoCarrier = UNIT:FindByName( "CargoCarrier" )
|
|
||||||
InfantryCargo:OnBoard( CargoCarrier )
|
|
||||||
Binary file not shown.
@ -0,0 +1,14 @@
|
|||||||
|
|
||||||
|
local Mission = MISSION:New( "Pickup Cargo", "High", "Test for Cargo Pickup", coalition.side.RED )
|
||||||
|
|
||||||
|
local CargoEngineer = UNIT:FindByName( "Engineer" )
|
||||||
|
local InfantryCargo = CARGO_UNIT:New( Mission, CargoEngineer, "Engineer", "Engineer Sven", "81", 2000, 25 )
|
||||||
|
|
||||||
|
local CargoCarrier = UNIT:FindByName( "Carrier" )
|
||||||
|
|
||||||
|
-- This will Load the Cargo into the Carrier, regardless where the Cargo is.
|
||||||
|
InfantryCargo:Load( CargoCarrier )
|
||||||
|
|
||||||
|
-- This will Unboard the Cargo from the Carrier.
|
||||||
|
-- The Cargo will run from the Carrier to a point in the NearRadius around the Carrier.
|
||||||
|
InfantryCargo:UnBoard( CargoCarrier, 10 )
|
||||||
Loading…
x
Reference in New Issue
Block a user