This commit is contained in:
Sven Van de Velde
2016-08-08 11:16:50 +02:00
parent 152accb93d
commit df90955347
11 changed files with 418 additions and 298 deletions

View File

@@ -0,0 +1,13 @@
local Mission = MISSION:New( "Pickup Cargo", "High", "Test for Cargo Pickup", coalition.side.RED )
local DeliveryUnit = UNIT:FindByName( "Delivery" )
local Letter = CARGO_PACKAGE:New( Mission, DeliveryUnit, "Letter", "Secret Orders", "0.3", 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.
Letter:Board( CargoCarrier, 40, 3, 25, 90 )

View File

@@ -12,4 +12,4 @@ 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.
-- Unboard the Cargo with a speed of 10 km/h, go to 200 meters 180 degrees from the Carrier, iin a zone of 25 meters (NearRadius).
InfantryCargo:UnBoard( 10, 200, 180 )
InfantryCargo:UnBoard( 10, 2, 20, 10, 180 )

View File

@@ -0,0 +1,15 @@
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.
-- Unboard the Cargo with a speed of 10 km/h, go to 200 meters 180 degrees from the Carrier, iin a zone of 25 meters (NearRadius).
InfantryCargo:UnBoard( 10, 2, 20, 10, 180 )