mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Publish reworked missions with global variables
This commit is contained in:
@@ -12,11 +12,11 @@
|
||||
-- 1. Observe the scoring granted to your flight when you hit and kill targets.
|
||||
|
||||
|
||||
local HQ = GROUP:FindByName( "HQ", "Bravo HQ" )
|
||||
HQ = GROUP:FindByName( "HQ", "Bravo HQ" )
|
||||
|
||||
local CommandCenter = COMMANDCENTER:New( HQ, "Bravo" )
|
||||
CommandCenter = COMMANDCENTER:New( HQ, "Bravo" )
|
||||
|
||||
local Scoring = SCORING:New( "Shooting Range 1" )
|
||||
Scoring = SCORING:New( "Shooting Range 1" )
|
||||
|
||||
Scoring:SetScaleDestroyScore( 10 )
|
||||
|
||||
@@ -27,12 +27,12 @@ Scoring:AddUnitScore( UNIT:FindByName( "Unit #001" ), 200 )
|
||||
-- Test for zone scores.
|
||||
|
||||
-- This one is to test scoring on normal units.
|
||||
local ShootingRangeZone = ZONE:New( "ScoringZone1" )
|
||||
ShootingRangeZone = ZONE:New( "ScoringZone1" )
|
||||
Scoring:AddZoneScore( ShootingRangeZone, 200 )
|
||||
|
||||
-- This one is to test scoring on scenery.
|
||||
-- Note that you can only destroy scenery with heavy weapons.
|
||||
local SceneryZone = ZONE:New( "ScoringZone2" )
|
||||
SceneryZone = ZONE:New( "ScoringZone2" )
|
||||
Scoring:AddZoneScore( SceneryZone, 200 )
|
||||
|
||||
Scoring:AddStaticScore(STATIC:FindByName( "Shooting Range #010" ), 100 )
|
||||
|
||||
Binary file not shown.
@@ -12,10 +12,10 @@
|
||||
-- 1. Observe the scoring granted to your flight when you hit and kill other clients.
|
||||
|
||||
|
||||
local HQ = GROUP:FindByName( "HQ", "Bravo HQ" )
|
||||
HQ = GROUP:FindByName( "HQ", "Bravo HQ" )
|
||||
|
||||
local CommandCenter = COMMANDCENTER:New( HQ, "Lima" )
|
||||
CommandCenter = COMMANDCENTER:New( HQ, "Lima" )
|
||||
|
||||
local Scoring = SCORING:New( "Detect Demo" )
|
||||
Scoring = SCORING:New( "Detect Demo" )
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
@@ -12,57 +12,57 @@
|
||||
-- 1. Observe the scoring granted to your flight when you hit and kill targets.
|
||||
|
||||
-- Define the patrol zones
|
||||
local BlueCapZone = ZONE_POLYGON:New( "BlueCapZone", GROUP:FindByName( "Blue CAP Zone Patrol" ) )
|
||||
local RedCapZone = ZONE_POLYGON:New( "RedCapZone", GROUP:FindByName( "Red CAP Zone Patrol" ) )
|
||||
BlueCapZone = ZONE_POLYGON:New( "BlueCapZone", GROUP:FindByName( "Blue CAP Zone Patrol" ) )
|
||||
RedCapZone = ZONE_POLYGON:New( "RedCapZone", GROUP:FindByName( "Red CAP Zone Patrol" ) )
|
||||
|
||||
-- Define the engage zones
|
||||
local BlueEngageZone = ZONE_POLYGON:New( "BlueEngageZone", GROUP:FindByName( "Blue CAP Zone Engage" ) )
|
||||
local RedEngageZone = ZONE_POLYGON:New( "RedEngageZone", GROUP:FindByName( "Red CAP Zone Engage" ) )
|
||||
BlueEngageZone = ZONE_POLYGON:New( "BlueEngageZone", GROUP:FindByName( "Blue CAP Zone Engage" ) )
|
||||
RedEngageZone = ZONE_POLYGON:New( "RedEngageZone", GROUP:FindByName( "Red CAP Zone Engage" ) )
|
||||
|
||||
-- Define the Spawn zones for ground vehicles
|
||||
local BlueSpawnGroundZone = ZONE_POLYGON:New( "BlueSpawnGroundZone", GROUP:FindByName( "Blue Spawn Zone" ) )
|
||||
--local RedSpawnGroundZone = ZONE_POLYGON:New( "RedSpawnGroundZone", GROUP:FindByName( "Red Spawn Zone" ) )
|
||||
BlueSpawnGroundZone = ZONE_POLYGON:New( "BlueSpawnGroundZone", GROUP:FindByName( "Blue Spawn Zone" ) )
|
||||
--RedSpawnGroundZone = ZONE_POLYGON:New( "RedSpawnGroundZone", GROUP:FindByName( "Red Spawn Zone" ) )
|
||||
|
||||
local RedSpawnGroundZone = ZONE:New( "Red Spawn Zone" )
|
||||
RedSpawnGroundZone = ZONE:New( "Red Spawn Zone" )
|
||||
|
||||
-- Define the Scoring zones that define the shelters
|
||||
local BlueShelterZone = ZONE_POLYGON:New( "Blue Shelters", GROUP:FindByName( "Blue Shelters" ) )
|
||||
local RedShelterZone = ZONE_POLYGON:New( "Red Shelters", GROUP:FindByName( "Red Shelters" ) )
|
||||
BlueShelterZone = ZONE_POLYGON:New( "Blue Shelters", GROUP:FindByName( "Blue Shelters" ) )
|
||||
RedShelterZone = ZONE_POLYGON:New( "Red Shelters", GROUP:FindByName( "Red Shelters" ) )
|
||||
|
||||
-- Define the Set of Clients that are used for the AI Balancers
|
||||
local BluePlanesClientSet = SET_CLIENT:New():FilterCoalitions( "blue" ):FilterCategories( "plane" ):FilterPrefixes( "Blue Player")
|
||||
local RedPlanesClientSet = SET_CLIENT:New():FilterCoalitions( "red" ):FilterCategories( "plane" ):FilterPrefixes( "Red Player")
|
||||
BluePlanesClientSet = SET_CLIENT:New():FilterCoalitions( "blue" ):FilterCategories( "plane" ):FilterPrefixes( "Blue Player")
|
||||
RedPlanesClientSet = SET_CLIENT:New():FilterCoalitions( "red" ):FilterCategories( "plane" ):FilterPrefixes( "Red Player")
|
||||
|
||||
-- Define the Spawn objects for the AI planes
|
||||
local BluePlanesSpawn = SPAWN:New( "BlueAICAP" ):InitCleanUp( 120 ):InitLimit( 5, 0 )
|
||||
local RedPlanesSpawn = SPAWN:New( "RedAICAP" ):InitCleanUp( 120 ):InitLimit( 5, 0 )
|
||||
BluePlanesSpawn = SPAWN:New( "BlueAICAP" ):InitCleanUp( 120 ):InitLimit( 5, 0 )
|
||||
RedPlanesSpawn = SPAWN:New( "RedAICAP" ):InitCleanUp( 120 ):InitLimit( 5, 0 )
|
||||
|
||||
-- Define the AI Balancers for the planes
|
||||
local BlueAIB = AI_BALANCER:New( BluePlanesClientSet, BluePlanesSpawn ):InitSpawnInterval( 60, 1200 )
|
||||
local RedAIB = AI_BALANCER:New( RedPlanesClientSet, RedPlanesSpawn ):InitSpawnInterval( 60, 1200 )
|
||||
BlueAIB = AI_BALANCER:New( BluePlanesClientSet, BluePlanesSpawn ):InitSpawnInterval( 60, 1200 )
|
||||
RedAIB = AI_BALANCER:New( RedPlanesClientSet, RedPlanesSpawn ):InitSpawnInterval( 60, 1200 )
|
||||
|
||||
-- Define the Spawn objects for the airbase defenses
|
||||
local BlueAirbaseDefense1Spawn = SPAWN:New( "Blue Airbase Defense 1" ):InitLimit( 10, 10 ):SpawnScheduled( 60, 0 )
|
||||
local BlueAirbaseDefense2Spawn = SPAWN:New( "Blue Airbase Defense 2" ):InitLimit( 2, 10 ):SpawnScheduled( 60, 0 )
|
||||
local RedAirbaseDefense1Spawn = SPAWN:New( "Red Airbase Defense 1" ):InitLimit( 10, 10 ):SpawnScheduled( 60, 0 )
|
||||
local RedAirbaseDefense2Spawn = SPAWN:New( "Red Airbase Defense 2" ):InitLimit( 2, 10 ):SpawnScheduled( 60, 0 )
|
||||
BlueAirbaseDefense1Spawn = SPAWN:New( "Blue Airbase Defense 1" ):InitLimit( 10, 10 ):SpawnScheduled( 60, 0 )
|
||||
BlueAirbaseDefense2Spawn = SPAWN:New( "Blue Airbase Defense 2" ):InitLimit( 2, 10 ):SpawnScheduled( 60, 0 )
|
||||
RedAirbaseDefense1Spawn = SPAWN:New( "Red Airbase Defense 1" ):InitLimit( 10, 10 ):SpawnScheduled( 60, 0 )
|
||||
RedAirbaseDefense2Spawn = SPAWN:New( "Red Airbase Defense 2" ):InitLimit( 2, 10 ):SpawnScheduled( 60, 0 )
|
||||
|
||||
-- Define the ground forces spawning engines...
|
||||
|
||||
-- First define the template arrays.
|
||||
local BlueGroundTemplates = { "Blue Ground Forces 1", "Blue Ground Forces 2", "Blue Ground Forces 3" }
|
||||
local RedGroundTemplates = { "Red Ground Forces 2", "Red Ground Forces 2", "Red Ground Forces 3" }
|
||||
BlueGroundTemplates = { "Blue Ground Forces 1", "Blue Ground Forces 2", "Blue Ground Forces 3" }
|
||||
RedGroundTemplates = { "Red Ground Forces 2", "Red Ground Forces 2", "Red Ground Forces 3" }
|
||||
|
||||
-- New we are using these templates to define the spawn objects for the ground forces.
|
||||
-- We spawn them at random places into the define zone.
|
||||
local BlueGroundSpawn = SPAWN
|
||||
BlueGroundSpawn = SPAWN
|
||||
:New( "Blue Ground Forces" )
|
||||
:InitLimit( 12, 30 )
|
||||
:InitRandomizeZones( { BlueSpawnGroundZone } )
|
||||
:InitRandomizeTemplate( BlueGroundTemplates )
|
||||
:SpawnScheduled( 60, 0.2 )
|
||||
|
||||
local RedGroundSpawn = SPAWN
|
||||
RedGroundSpawn = SPAWN
|
||||
:New( "Red Ground Forces" )
|
||||
:InitLimit( 12, 30 )
|
||||
:InitRandomizeTemplate( RedGroundTemplates )
|
||||
@@ -71,8 +71,8 @@ local RedGroundSpawn = SPAWN
|
||||
|
||||
|
||||
|
||||
local BlueCap = {}
|
||||
local RedCap = {}
|
||||
BlueCap = {}
|
||||
RedCap = {}
|
||||
|
||||
-- Define the OnAfterSpawned events of the AI balancer Spawn Groups
|
||||
function BlueAIB:OnAfterSpawned( SetGroup, From, Event, To, AIGroup )
|
||||
|
||||
Reference in New Issue
Block a user