-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBVR.lua
More file actions
34 lines (26 loc) · 1.08 KB
/
BVR.lua
File metadata and controls
34 lines (26 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
env.info( '*** GVAW BVR Training MOOSE script ***' )
env.info( '*** GVAW MOOSE MISSION SCRIPT START ***' )
_SETTINGS:SetPlayerMenuOff()
local function restartMission()
trigger.action.setUserFlag("999", true)
end
local function spawnBvr(qty)
local SpawnBvrAdversary = SPAWN:New("ADV_FLIGHT" .. qty)
SpawnBvrAdversary:Spawn()
end
local function clearSpawns()
local activeSpawns = SET_GROUP:New()
activeSpawns:FilterPrefixes("ADV")
:FilterStart()
activeSpawns:ForEachGroupAlive(function(group)
group:Destroy()
end)
end
-- ADMIN SECTION
MENU_COALITION_COMMAND:New(coalition.side.BLUE, "Spawn 1x Adversary", nil, spawnBvr, "1")
MENU_COALITION_COMMAND:New(coalition.side.BLUE, "Spawn 2x Adversary", nil, spawnBvr, "2")
MENU_COALITION_COMMAND:New(coalition.side.BLUE, "Spawn 4x Adversary", nil, spawnBvr, "4")
MENU_COALITION_COMMAND:New(coalition.side.BLUE, "Remove Adversaries", nil, clearSpawns)
--MENU_COALITION_COMMAND:New(coalition.side.BLUE, "Restart Mission", nil, restartMission )
--END ADMIN SECTION
env.info( '*** GVAW MOOSE MISSION SCRIPT END ***' )