mirror of
https://github.com/FlightControl-Master/MOOSE_MISSIONS.git
synced 2026-08-19 22:16:13 +00:00
26 lines
911 B
Lua
26 lines
911 B
Lua
|
|
CargoEngineer = UNIT:FindByName( "Engineer" )
|
|
InfantryCargo = AI_CARGO_UNIT:New( CargoEngineer, "Engineer", "Engineer Sven", "81", 2000, 25 )
|
|
|
|
CargoCarrierFrom = UNIT:FindByName( "CarrierFrom" )
|
|
|
|
CargoCarrierTo = UNIT:FindByName( "CarrierTo" )
|
|
|
|
-- 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( CargoCarrierFrom )
|
|
|
|
-- Once the Cargo has been loaded into the Carrier, drive to a point and unload the Cargo.
|
|
function InfantryCargo:OnEnterLoaded()
|
|
self:__UnBoard( 1 )
|
|
self.OnEnterLoaded = nil
|
|
end
|
|
|
|
-- Once the Cargo has been unloaded from the Carrier (the Cargo has arrived to the unload gathering point), OnBoard the Cargo in the other Carrier.
|
|
function InfantryCargo:OnEnterUnLoaded()
|
|
self:__Board( 1, CargoCarrierTo )
|
|
self.OnEnterUnLoaded = nil
|
|
end
|
|
|