mirror of
https://github.com/FlightControl-Master/MOOSE_MISSIONS.git
synced 2026-08-28 11:35:32 +00:00
Restructuring of folder tree
This commit is contained in:
+24
@@ -0,0 +1,24 @@
|
||||
---
|
||||
-- Name: AIC-APC-001 - Troops Relocate APC
|
||||
-- Author: FlightControl
|
||||
-- Date Created: 07 Apr 2018
|
||||
--
|
||||
-- Demonstration of troops relocation when carrier is destroyed...
|
||||
-- Carrier will relocate to the rescue carrier.
|
||||
|
||||
local InfantryCargoSet = SET_CARGO:New():FilterTypes( "Infantry" ):FilterStart()
|
||||
|
||||
local CargoCarrier = GROUP:FindByName( "Carrier" )
|
||||
|
||||
CargoTroops = AI_CARGO_APC:New( CargoCarrier, InfantryCargoSet, 500 )
|
||||
|
||||
|
||||
function CargoTroops:OnAfterDestroyed( CargoCarrier )
|
||||
CargoTroops:F( { Destroyed = CargoCarrier } )
|
||||
-- The coordinate is passed where the carrier is destroyed.
|
||||
local NewCarrierGroup = self:FindCarrier( CargoCarrier:GetCoordinate(), 1000 ) -- which returns one Carrier GROUP object or nil.
|
||||
if NewCarrierGroup then
|
||||
self:SetCarrier( NewCarrierGroup )
|
||||
end
|
||||
end
|
||||
|
||||
BIN
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user