mirror of
https://github.com/FlightControl-Master/MOOSE_MISSIONS.git
synced 2025-08-15 10:37:46 +00:00
Add files via upload
This commit is contained in:
parent
a24b62b460
commit
e7cecd11f8
@ -0,0 +1,68 @@
|
||||
-------------------------------------------------------------------------
|
||||
-- CTLD 110 - Caucasus - Build and Move
|
||||
-------------------------------------------------------------------------
|
||||
-- Documentation
|
||||
--
|
||||
-- CTLD: https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/Ops.CTLD.html
|
||||
--
|
||||
-------------------------------------------------------------------------
|
||||
-- Join a Helicopter. Use the F10 menu to request crates and/or troops.
|
||||
-- Fly over to the drop zone at the far end of the airport and unload.
|
||||
-- We'll auto create a MOVE type zone and the unloaded troops & vehicles
|
||||
-- will attack REDFOR.
|
||||
-------------------------------------------------------------------------
|
||||
-- Date: November 2022
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
_SETTINGS:SetPlayerMenuOff()
|
||||
|
||||
local my_ctld = CTLD:New(coalition.side.BLUE,{"Helicargo"},"Lufttransportbrigade I")
|
||||
my_ctld.forcehoverload = false
|
||||
my_ctld.movetroopsdistance = 6000
|
||||
my_ctld.debug = false
|
||||
my_ctld.buildtime = 30
|
||||
my_ctld:__Start(5)
|
||||
|
||||
-- generate generically loadable stuff
|
||||
my_ctld:AddTroopsCargo("Infantry",{"Infantry6"},CTLD_CARGO.Enum.TROOPS,6,80,nil,"Troops")
|
||||
my_ctld:AddCratesCargo("Humvee",{"Humvee"},CTLD_CARGO.Enum.VEHICLE,1,100,nil,"Vehicles")
|
||||
|
||||
-- generate zone types
|
||||
my_ctld:AddCTLDZone("Loadzone",CTLD.CargoZoneType.LOAD,SMOKECOLOR.Blue,true,true) -- Note: since there are no blue flares, this will be a white flare when requested.
|
||||
my_ctld:AddCTLDZone("Dropzone",CTLD.CargoZoneType.DROP,SMOKECOLOR.Red,true,true)
|
||||
local dropzone = ZONE:FindByName("Dropzone"):DrawZone(-1,{0,0,1},1,{0,0,1},0.25,1)
|
||||
|
||||
-- update unit capabilities for testing
|
||||
my_ctld:UnitCapabilities("SA342L", true, true, 1, 6, 12, 1000)
|
||||
|
||||
-- We're using OnBefore ... to add a MOVE zone
|
||||
function my_ctld:OnBeforeTroopsDeployed(From,Event,To,Group,Unit,Troops)
|
||||
-- find baddies near by with a ZONE filter
|
||||
local zone = ZONE_GROUP:New(Group:GetName(),Group,6000)
|
||||
local enemyset = SET_GROUP:New():FilterCoalitions("red"):FilterCategoryGround():FilterZones({zone}):FilterOnce()
|
||||
if enemyset:Count() > 0 then
|
||||
MESSAGE:New(string.format("Found %d enemy group nearby!", enemyset:Count()),15):ToAll()
|
||||
-- baddies found, add zone around them
|
||||
local zonename = "Baddies-"..math.random(1,10000)
|
||||
local redzone = ZONE_RADIUS:New(zonename,enemyset:GetRandom():GetCoordinate():GetVec2(),200)
|
||||
redzone:DrawZone(-1,{1,0.6,0},1,{1,0.6,0},0.25,4)
|
||||
my_ctld:AddCTLDZone(zonename,CTLD.CargoZoneType.MOVE,SMOKECOLOR.Orange,true,false)
|
||||
end
|
||||
return self
|
||||
end
|
||||
|
||||
-- We're using OnBefore ... to add a MOVE zone
|
||||
function my_ctld:OnBeforeCratesBuild(From,Event,To,Group,Unit,Vehicle)
|
||||
-- find baddies near by with a ZONE filter
|
||||
local zone = ZONE_GROUP:New(Group:GetName(),Group,6000)
|
||||
local enemyset = SET_GROUP:New():FilterCoalitions("red"):FilterCategoryGround():FilterZones({zone}):FilterOnce()
|
||||
if enemyset:Count() > 0 then
|
||||
MESSAGE:New(string.format("Found %d enemy group nearby!", enemyset:Count()),15):ToAll()
|
||||
-- baddies found, add zone around them
|
||||
local zonename = "Baddies-"..math.random(1,10000)
|
||||
local redzone = ZONE_RADIUS:New(zonename,enemyset:GetRandom():GetCoordinate():GetVec2(),200)
|
||||
redzone:DrawZone(-1,{1,0.6,0},1,{1,0.6,0},0.25,4)
|
||||
my_ctld:AddCTLDZone(zonename,CTLD.CargoZoneType.MOVE,SMOKECOLOR.Orange,true,false)
|
||||
end
|
||||
return self
|
||||
end
|
||||
Binary file not shown.
10
OPS - CTLD/CTLD 110 - Caucasus - Build and Move/pack.ps1
Normal file
10
OPS - CTLD/CTLD 110 - Caucasus - Build and Move/pack.ps1
Normal file
@ -0,0 +1,10 @@
|
||||
$dir = split-path -parent $MyInvocation.MyCommand.Definition
|
||||
cd $dir
|
||||
$file = Split-Path $dir -leaf
|
||||
|
||||
$dir
|
||||
$file
|
||||
|
||||
cd "_unpacked"
|
||||
. 7z a -r -y -tzip "..\$file.miz" *
|
||||
cd ..
|
||||
@ -0,0 +1,7 @@
|
||||
$dir = split-path -parent $MyInvocation.MyCommand.Definition
|
||||
cd $dir
|
||||
$file = Split-Path $dir -leaf
|
||||
Remove-Item .\_unpacked -Force -Recurse
|
||||
md "_unpacked"
|
||||
cd "_unpacked"
|
||||
. 7z x -r -y "..\$file.miz" *
|
||||
Loading…
x
Reference in New Issue
Block a user