MOOSE demonstration missions [skip ci]

This commit is contained in:
FlightControl-User
2020-12-22 14:33:28 +00:00
parent 0d770d72a1
commit 657b65799b
404 changed files with 84 additions and 0 deletions

View File

@@ -0,0 +1,71 @@
-------------------------------------------------------------------------
-- MTS-200 - MANTIS - Advanced Mode
-------------------------------------------------------------------------
-- Documentation
--
-- MANTIS: https://flightcontrol-master.github.io/MOOSE_DOCS/Documentation/Functional.Mantis.html
--
-- Note: As of Dec/20, MANTIS is WIP. Needs a recent build of Moose.lua > 17 Dec 20
-- for CONTROLLABLE:RelocateGroundRandomInRadius() to be available
-- https://flightcontrol-master.github.io/MOOSE_DOCS/Documentation/CONTROLLABLE.RelocateGroundRandomInRadius.html
-------------------------------------------------------------------------
-- Observe a set of SAM sites being attacked by F18 SEAD, A10 and Helicopters.
-- HQ and EWR will be destroyed after 10 and 15 mins, respectively
-- Detection will slow down accordingly, if both units are dead, all SAM sites go to RED state
-- Set up of a new HQ and EWR will recover MANTIS
-------------------------------------------------------------------------
-- Date: 21 Dec 2020
-------------------------------------------------------------------------
myredmantis = MANTIS:New("myredmantis","Red SAM","Red EWR","Red HQ","red",true)
--myredmantis:SetAutoRelocate(true, true) -- make HQ and EWR relocatable, if they are actually mobile in DCS!
myredmantis:SetAdvancedMode(true, 100) -- switch on advanced mode - detection will slow down or die if HQ and EWR die
myredmantis:Debug(false)
myredmantis.verbose = true -- watch DCS.log
myredmantis:Start()
function destroy(objectname)
local text = "Destroying "..objectname
m=MESSAGE:New(text,30,"Info"):ToAll()
local grp = GROUP:FindByName(objectname)
grp:Destroy()
end
function createhq()
newhq = SPAWN
:New("Red HQ-1")
:InitDelayOff()
:OnSpawnGroup(
function (group)
myredmantis:SetCommandCenter(group)
end
)
:Spawn()
local text = "Creating new HQ!"
m=MESSAGE:New(text,30,"Info"):ToAll()
end
function createewr()
newewr = SPAWN
:New("Red EWR-1")
:InitDelayOff()
:Spawn()
local text = "Creating new EWR!"
m=MESSAGE:New(text,30,"Info"):ToAll()
end
hqtimer = TIMER:New(destroy,"Red HQ")
ewrtimer = TIMER:New(destroy,"Red EWR")
awacstimer = TIMER:New(destroy,"Red EWR Awacs")
nhqtimer = TIMER:New(createhq)
newrtimer = TIMER:New(createewr)
-- slow down
hqtimer:Start(300) -- 5 min
ewrtimer:Start(360) -- 6 min
awacstimer:Start(420) -- 7 min
--speed up
nhqtimer:Start(600) -- 10 min
newrtimer:Start(660) -- 11 min

View File

@@ -0,0 +1,6 @@
$dir = split-path -parent $MyInvocation.MyCommand.Definition
cd $dir
$file = Split-Path $dir -leaf
cd "_unpacked"
. 7z a -r -y -tzip "..\$file.miz" *
cd ..

View File

@@ -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" *