Last step of bid folder restructure

This commit is contained in:
kaltokri
2024-01-01 23:44:44 +01:00
parent f31942aef3
commit f15138294b
330 changed files with 7000 additions and 7051 deletions
@@ -1,80 +1,80 @@
-- This test mission models the behaviour of the AI_PATROL_ZONE class. -- This test mission models the behaviour of the AI_PATROL_ZONE class.
-- --
-- It creates a 2 AI_PATROL_ZONE objects with the name Patrol1 and Patrol2. -- It creates a 2 AI_PATROL_ZONE objects with the name Patrol1 and Patrol2.
-- Patrol1 will govern a GROUP object to patrol the zone defined by PatrolZone1, within 3000 meters and 6000 meters, within a speed of 400 and 600 km/h. -- Patrol1 will govern a GROUP object to patrol the zone defined by PatrolZone1, within 3000 meters and 6000 meters, within a speed of 400 and 600 km/h.
-- When the GROUP object that is assigned to Patrol has fuel below 20%, the GROUP object will orbit for 60 secondes, before returning to base. -- When the GROUP object that is assigned to Patrol has fuel below 20%, the GROUP object will orbit for 60 secondes, before returning to base.
-- --
-- Patrol2 will goven a GROUP object to patrol the zone defined by PatrolZone2, within 600 meters and 1000 meters, within a speed of 300 and 400 km/h. -- Patrol2 will goven a GROUP object to patrol the zone defined by PatrolZone2, within 600 meters and 1000 meters, within a speed of 300 and 400 km/h.
-- When the GROUP object that is assigned to Patrol has fuel below 20%, the GROUP object will orbit for 0 secondes, before returning to base. -- When the GROUP object that is assigned to Patrol has fuel below 20%, the GROUP object will orbit for 0 secondes, before returning to base.
-- --
-- The Patrol1 and Patrol2 object have 2 state transition functions defined, which customize the default behaviour of the RTB state. -- The Patrol1 and Patrol2 object have 2 state transition functions defined, which customize the default behaviour of the RTB state.
-- When Patrol1 goes RTB, it will create a new GROUP object, that will be assigned to Patrol2. -- When Patrol1 goes RTB, it will create a new GROUP object, that will be assigned to Patrol2.
-- When Patrol2 goes RTB, it will create a new GROUP object, that will be assgined to Patrol1. -- When Patrol2 goes RTB, it will create a new GROUP object, that will be assgined to Patrol1.
-- --
-- In this way, the Patrol1 and Patrol2 objects are fluctuating the patrol pattern from PatrolZone1 and PatrolZone2 :-) -- In this way, the Patrol1 and Patrol2 objects are fluctuating the patrol pattern from PatrolZone1 and PatrolZone2 :-)
PatrolZoneGroup1 = GROUP:FindByName( "Patrol Zone 1" ) PatrolZoneGroup1 = GROUP:FindByName( "Patrol Zone 1" )
PatrolZone1 = ZONE_POLYGON:New( "Patrol Zone 1", PatrolZoneGroup1 ) PatrolZone1 = ZONE_POLYGON:New( "Patrol Zone 1", PatrolZoneGroup1 )
PatrolZoneGroup2 = GROUP:FindByName( "Patrol Zone 2" ) PatrolZoneGroup2 = GROUP:FindByName( "Patrol Zone 2" )
PatrolZone2 = ZONE_POLYGON:New( "Patrol Zone 2", PatrolZoneGroup2 ) PatrolZone2 = ZONE_POLYGON:New( "Patrol Zone 2", PatrolZoneGroup2 )
PatrolSpawn = SPAWN:New( "Patrol Group" ) PatrolSpawn = SPAWN:New( "Patrol Group" )
PatrolGroup = PatrolSpawn:Spawn() PatrolGroup = PatrolSpawn:Spawn()
Patrol1 = AI_PATROL_ZONE:New( PatrolZone1, 3000, 6000, 400, 600 ) Patrol1 = AI_PATROL_ZONE:New( PatrolZone1, 3000, 6000, 400, 600 )
Patrol1:ManageFuel( 0.2, 60 ) Patrol1:ManageFuel( 0.2, 60 )
Patrol1:SetControllable( PatrolGroup ) Patrol1:SetControllable( PatrolGroup )
Patrol1:__Start( 5 ) Patrol1:__Start( 5 )
Patrol2 = AI_PATROL_ZONE:New( PatrolZone2, 600, 1000, 300, 400 ) Patrol2 = AI_PATROL_ZONE:New( PatrolZone2, 600, 1000, 300, 400 )
Patrol2:ManageFuel( 0.2, 0 ) Patrol2:ManageFuel( 0.2, 0 )
--- State transition function for the PROCESS\_PATROLZONE **Patrol1** object --- State transition function for the PROCESS\_PATROLZONE **Patrol1** object
-- @param #AI_PATROL_ZONE self -- @param #AI_PATROL_ZONE self
-- @param Wrapper.Group#GROUP AIGroup -- @param Wrapper.Group#GROUP AIGroup
-- @return #boolean If false is returned, then the OnAfter state transition function will not be called. -- @return #boolean If false is returned, then the OnAfter state transition function will not be called.
function Patrol1:OnLeaveRTB( AIGroup ) function Patrol1:OnLeaveRTB( AIGroup )
AIGroup:MessageToRed( "Returning to base", 20 ) AIGroup:MessageToRed( "Returning to base", 20 )
end end
--- State transition function for the PROCESS\_PATROLZONE **Patrol1** object --- State transition function for the PROCESS\_PATROLZONE **Patrol1** object
-- @param Process_PatrolCore.Zone#AI_PATROL_ZONE self -- @param Process_PatrolCore.Zone#AI_PATROL_ZONE self
-- @param Wrapper.Group#GROUP AIGroup -- @param Wrapper.Group#GROUP AIGroup
function Patrol1:OnAfterRTB( AIGroup ) function Patrol1:OnAfterRTB( AIGroup )
local NewGroup = PatrolSpawn:Spawn() local NewGroup = PatrolSpawn:Spawn()
Patrol2:SetControllable( NewGroup ) Patrol2:SetControllable( NewGroup )
Patrol2:__Start( 1 ) Patrol2:__Start( 1 )
end end
--- State transition function for the PROCESS\_PATROLZONE **Patrol1** object --- State transition function for the PROCESS\_PATROLZONE **Patrol1** object
-- @param Process_PatrolCore.Zone#AI_PATROL_ZONE self -- @param Process_PatrolCore.Zone#AI_PATROL_ZONE self
-- @param Wrapper.Group#GROUP AIGroup -- @param Wrapper.Group#GROUP AIGroup
function Patrol1:OnEnterPatrol( AIGroup ) function Patrol1:OnEnterPatrol( AIGroup )
AIGroup:MessageToRed( "Patrolling in zone " .. PatrolZone1:GetName() , 20 ) AIGroup:MessageToRed( "Patrolling in zone " .. PatrolZone1:GetName() , 20 )
end end
--- State transition function for the PROCESS\_PATROLZONE **Patrol2** object --- State transition function for the PROCESS\_PATROLZONE **Patrol2** object
-- @param #AI_PATROL_ZONE self -- @param #AI_PATROL_ZONE self
-- @param Wrapper.Group#GROUP AIGroup -- @param Wrapper.Group#GROUP AIGroup
-- @return #boolean If false is returned, then the OnEnter state transition function will not be called. -- @return #boolean If false is returned, then the OnEnter state transition function will not be called.
function Patrol2:OnBeforeRTB( AIGroup ) function Patrol2:OnBeforeRTB( AIGroup )
AIGroup:MessageToRed( "Returning to base", 20 ) AIGroup:MessageToRed( "Returning to base", 20 )
end end
--- State transition function for the PROCESS\_PATROLZONE **Patrol2** object --- State transition function for the PROCESS\_PATROLZONE **Patrol2** object
-- @param Process_PatrolCore.Zone#AI_PATROL_ZONE self -- @param Process_PatrolCore.Zone#AI_PATROL_ZONE self
-- @param Wrapper.Group#GROUP AIGroup -- @param Wrapper.Group#GROUP AIGroup
function Patrol2:OnEnterRTB( AIGroup ) function Patrol2:OnEnterRTB( AIGroup )
local NewGroup = PatrolSpawn:Spawn() local NewGroup = PatrolSpawn:Spawn()
Patrol1:SetControllable( NewGroup ) Patrol1:SetControllable( NewGroup )
Patrol1:__Start( 1 ) Patrol1:__Start( 1 )
end end
--- State transition function for the PROCESS\_PATROLZONE **Patrol2** object --- State transition function for the PROCESS\_PATROLZONE **Patrol2** object
-- @param Process_PatrolCore.Zone#AI_PATROL_ZONE self -- @param Process_PatrolCore.Zone#AI_PATROL_ZONE self
-- @param Wrapper.Group#GROUP AIGroup -- @param Wrapper.Group#GROUP AIGroup
function Patrol2:OnEnterPatrol( AIGroup ) function Patrol2:OnEnterPatrol( AIGroup )
AIGroup:MessageToRed( "Patrolling in zone " .. PatrolZone2:GetName() , 20 ) AIGroup:MessageToRed( "Patrolling in zone " .. PatrolZone2:GetName() , 20 )
end end
@@ -1,33 +1,33 @@
--- Simple function scheduling --- Simple function scheduling
-- --
-- === -- ===
-- --
-- Author: FlightControl -- Author: FlightControl
-- Date Created: 12 Dec 2016 -- Date Created: 12 Dec 2016
-- --
-- # Situation -- # Situation
-- Uses the Tracing functions from BASE within the DCS.log file. Check the DCS.log file for the results. -- Uses the Tracing functions from BASE within the DCS.log file. Check the DCS.log file for the results.
-- Create a new SCHEDULER object. -- Create a new SCHEDULER object.
-- Check the DCS.log. -- Check the DCS.log.
-- --
-- # Test cases: -- # Test cases:
-- --
-- 1. The log should contain a "Hello World" line that is fired off 10 seconds after mission start. -- 1. The log should contain a "Hello World" line that is fired off 10 seconds after mission start.
-- --
-- --
-- # Status: TESTED - 12 Dec 2016 -- # Status: TESTED - 12 Dec 2016
local TestScheduler = SCHEDULER:New( nil, local TestScheduler = SCHEDULER:New( nil,
function() function()
BASE:E( "Hello World 1") BASE:E( "Hello World 1")
end, {}, 1 end, {}, 1
) )
SCHEDULER:New( nil, SCHEDULER:New( nil,
function() function()
BASE:E( "Hello World 2") BASE:E( "Hello World 2")
end, {}, 2 end, {}, 2
) )
collectgarbage() collectgarbage()
@@ -1,34 +1,34 @@
--- Simple Object Scheduling --- Simple Object Scheduling
-- --
-- === -- ===
-- --
-- Author: FlightControl -- Author: FlightControl
-- Date Created: 12 Dec 2016 -- Date Created: 12 Dec 2016
-- --
-- # Situation -- # Situation
-- Uses the Tracing functions from BASE within the DCS.log file. Check the DCS.log file for the results. -- Uses the Tracing functions from BASE within the DCS.log file. Check the DCS.log file for the results.
-- Create a new SCHEDULER object. -- Create a new SCHEDULER object.
-- Check the DCS.log. -- Check the DCS.log.
-- --
-- # Test cases: -- # Test cases:
-- --
-- 1. Tracing of a scheduler in an Object. -- 1. Tracing of a scheduler in an Object.
-- The log should contain a "Hello World" line of the object, that is fired off 1 seconds after mission start. -- The log should contain a "Hello World" line of the object, that is fired off 1 seconds after mission start.
-- --
-- # Status: TESTED - 12 Dec 2016 -- # Status: TESTED - 12 Dec 2016
local TEST_BASE = { local TEST_BASE = {
ClassName = "TEST_BASE", ClassName = "TEST_BASE",
} }
function TEST_BASE:New( Message ) function TEST_BASE:New( Message )
self = BASE:Inherit( self, BASE:New() ) self = BASE:Inherit( self, BASE:New() )
local TestScheduler = SCHEDULER:New( self, local TestScheduler = SCHEDULER:New( self,
function( Object, Message ) function( Object, Message )
Object:E( Message ) Object:E( Message )
end, { Message }, 1 end, { Message }, 1
) )
end end
local Test = TEST_BASE:New( "Hello World" ) local Test = TEST_BASE:New( "Hello World" )
@@ -1,24 +1,24 @@
--- Simple repeat scheduling of a function. --- Simple repeat scheduling of a function.
-- --
-- === -- ===
-- --
-- Author: FlightControl -- Author: FlightControl
-- Date Created: 13 Dec 2016 -- Date Created: 13 Dec 2016
-- --
-- # Situation -- # Situation
-- Uses the Tracing functions from BASE within the DCS.log file. Check the DCS.log file for the results. -- Uses the Tracing functions from BASE within the DCS.log file. Check the DCS.log file for the results.
-- Create a new SCHEDULER object. -- Create a new SCHEDULER object.
-- Check the DCS.log. -- Check the DCS.log.
-- --
-- # Test cases: -- # Test cases:
-- --
-- 1. The log should contain "Hello World Repeat" lines that is fired off 1 second after mission start and is repeated every 1 seconds. -- 1. The log should contain "Hello World Repeat" lines that is fired off 1 second after mission start and is repeated every 1 seconds.
-- --
-- --
-- # Status: TESTED - 13 Dec 2016 -- # Status: TESTED - 13 Dec 2016
local TestScheduler = SCHEDULER:New( nil, local TestScheduler = SCHEDULER:New( nil,
function() function()
BASE:E( "Hello World Repeat") BASE:E( "Hello World Repeat")
end, {}, 1, 1 end, {}, 1, 1
) )
@@ -1,44 +1,44 @@
--- Object Repeat Scheduling. --- Object Repeat Scheduling.
-- --
-- === -- ===
-- --
-- Author: FlightControl -- Author: FlightControl
-- Date Created: 13 Dec 2016 -- Date Created: 13 Dec 2016
-- --
-- # Situation -- # Situation
-- Uses the Tracing functions from BASE within the DCS.log file. Check the DCS.log file for the results. -- Uses the Tracing functions from BASE within the DCS.log file. Check the DCS.log file for the results.
-- Create a new SCHEDULER object. -- Create a new SCHEDULER object.
-- Check the DCS.log. -- Check the DCS.log.
-- --
-- Three Test objects are created. -- Three Test objects are created.
-- --
-- # Test cases: -- # Test cases:
-- --
-- 1. Object Test1 should start after 1 seconds showing every second "Hello World Repeat 1". -- 1. Object Test1 should start after 1 seconds showing every second "Hello World Repeat 1".
-- 2. Object Test2 should start after 2 seconds showing every 2 seconds "Hello World Repeat 2" and stop after one minute. -- 2. Object Test2 should start after 2 seconds showing every 2 seconds "Hello World Repeat 2" and stop after one minute.
-- 3. Object Test3 should start after 10 seconds showing with a 10 seconds randomized interval of 10 seconds "Hello World Repeat 3" and stop after one minute. -- 3. Object Test3 should start after 10 seconds showing with a 10 seconds randomized interval of 10 seconds "Hello World Repeat 3" and stop after one minute.
-- --
-- # Status: TESTED - 13 Dec 2016 -- # Status: TESTED - 13 Dec 2016
local TEST_BASE = { local TEST_BASE = {
ClassName = "TEST_BASE", ClassName = "TEST_BASE",
} }
function TEST_BASE:New( Message, Start, Repeat, Randomize, Stop ) function TEST_BASE:New( Message, Start, Repeat, Randomize, Stop )
self = BASE:Inherit( self, BASE:New() ) self = BASE:Inherit( self, BASE:New() )
self.TestScheduler = SCHEDULER:New( self, self.TestScheduler = SCHEDULER:New( self,
function( Object, Message ) function( Object, Message )
Object:E( Message ) Object:E( Message )
end, { Message }, Start, Repeat, Randomize, Stop end, { Message }, Start, Repeat, Randomize, Stop
) )
return self return self
end end
do do
local Test1 = TEST_BASE:New( "Hello World Repeat 1", 1, 1 ) local Test1 = TEST_BASE:New( "Hello World Repeat 1", 1, 1 )
end end
local Test2 = TEST_BASE:New( "Hello World Repeat 2", 2, 2, 0, 60 ) local Test2 = TEST_BASE:New( "Hello World Repeat 2", 2, 2, 0, 60 )
local Test3 = TEST_BASE:New( "Hello World Repeat 3", 10, 10, 1.0, 60 ) local Test3 = TEST_BASE:New( "Hello World Repeat 3", 10, 10, 1.0, 60 )
@@ -1,41 +1,41 @@
--- Simple repeat scheduling of a function. --- Simple repeat scheduling of a function.
-- --
-- === -- ===
-- --
-- Author: FlightControl -- Author: FlightControl
-- Date Created: 14 Dec 2016 -- Date Created: 14 Dec 2016
-- --
-- # Situation -- # Situation
-- Uses the Tracing functions from BASE within the DCS.log file. Check the DCS.log file for the results. -- Uses the Tracing functions from BASE within the DCS.log file. Check the DCS.log file for the results.
-- Create a new SCHEDULER object. -- Create a new SCHEDULER object.
-- Check the DCS.log. -- Check the DCS.log.
-- --
-- Start a schedule called TestScheduler. TestScheduler will repeat the words "Hello World Repeat" every second in the log. -- Start a schedule called TestScheduler. TestScheduler will repeat the words "Hello World Repeat" every second in the log.
-- After 10 seconds, TestScheduler will stop the scheduler. -- After 10 seconds, TestScheduler will stop the scheduler.
-- After 20 seconds, TestScheduler will restart the scheduler. -- After 20 seconds, TestScheduler will restart the scheduler.
-- --
-- # Test cases: -- # Test cases:
-- --
-- 1. Check that the "Hello World Repeat" lines are consistent with the scheduling timing. They should stop showing after 10 seconds, and restart after 20 seconds. -- 1. Check that the "Hello World Repeat" lines are consistent with the scheduling timing. They should stop showing after 10 seconds, and restart after 20 seconds.
-- --
-- --
-- # Status: TESTED - 14 Dec 2016 -- # Status: TESTED - 14 Dec 2016
local TestScheduler = SCHEDULER:New( nil, local TestScheduler = SCHEDULER:New( nil,
function() function()
BASE:E( timer.getTime() .. " - Hello World Repeat") BASE:E( timer.getTime() .. " - Hello World Repeat")
end, {}, 1, 1 end, {}, 1, 1
) )
SCHEDULER:New( nil, SCHEDULER:New( nil,
function() function()
TestScheduler:Stop() TestScheduler:Stop()
end, {}, 10 end, {}, 10
) )
SCHEDULER:New( nil, SCHEDULER:New( nil,
function() function()
TestScheduler:Start() TestScheduler:Start()
end, {}, 20 end, {}, 20
) )
@@ -1,60 +1,60 @@
--- No Object Scheduling because of garbage collect and Object nillification. --- No Object Scheduling because of garbage collect and Object nillification.
-- --
-- === -- ===
-- --
-- Author: FlightControl -- Author: FlightControl
-- Date Created: 12 Dec 2016 -- Date Created: 12 Dec 2016
-- --
-- # Situation -- # Situation
-- Uses the Tracing functions from BASE within the DCS.log file. Check the DCS.log file for the results. -- Uses the Tracing functions from BASE within the DCS.log file. Check the DCS.log file for the results.
-- Create a new SCHEDULER object. -- Create a new SCHEDULER object.
-- Check the DCS.log. -- Check the DCS.log.
-- --
-- A Test object is created. -- A Test object is created.
-- It is nillified directly after the Schedule has been planned. -- It is nillified directly after the Schedule has been planned.
-- There should be no schedule fired. -- There should be no schedule fired.
-- The Test object should be garbage collected! -- The Test object should be garbage collected!
-- --
-- THIS IS A VERY IMPORTANT TEST! -- THIS IS A VERY IMPORTANT TEST!
-- --
-- # Test cases: -- # Test cases:
-- --
-- 1. No schedule should be fired! The destructors of the Test object should be shown. -- 1. No schedule should be fired! The destructors of the Test object should be shown.
-- 2. Commend the nillification of the Test object in the source, and test again. -- 2. Commend the nillification of the Test object in the source, and test again.
-- The schedule should now be fired and Hello World should be logged through the Test object. -- The schedule should now be fired and Hello World should be logged through the Test object.
-- --
-- # Status: STARTED - 12 Dec 2016 -- # Status: STARTED - 12 Dec 2016
local TEST_BASE = { local TEST_BASE = {
ClassName = "TEST_BASE", ClassName = "TEST_BASE",
} }
function TEST_BASE:New( Message ) function TEST_BASE:New( Message )
self = BASE:Inherit( self, BASE:New() ) self = BASE:Inherit( self, BASE:New() )
self.TestScheduler = SCHEDULER:New( self, self.TestScheduler = SCHEDULER:New( self,
function( Object, Message ) function( Object, Message )
Object:E( Message ) Object:E( Message )
end, { Message }, 1 end, { Message }, 1
) )
return self return self
end end
do do
local Test1 = TEST_BASE:New( "Hello World Test 1" ) local Test1 = TEST_BASE:New( "Hello World Test 1" )
Test1 = nil Test1 = nil
BASE:E( Test1 ) BASE:E( Test1 )
end end
local Test2 = TEST_BASE:New( "Hello World Test 2" ) local Test2 = TEST_BASE:New( "Hello World Test 2" )
BASE:E( Test2 ) BASE:E( Test2 )
local Test3 = TEST_BASE:New( "Hello World Test 3" ) local Test3 = TEST_BASE:New( "Hello World Test 3" )
Test3 = nil Test3 = nil
BASE:E( Test3 ) BASE:E( Test3 )
collectgarbage() collectgarbage()
BASE:E( "Collect Garbage executed." ) BASE:E( "Collect Garbage executed." )
BASE:E( "You should only see a Hello Worlld message for Test 2!" ) BASE:E( "You should only see a Hello Worlld message for Test 2!" )
BASE:E( "Check if Test 1 and Test 3 are garbage collected!" ) BASE:E( "Check if Test 1 and Test 3 are garbage collected!" )
@@ -1,80 +1,80 @@
--- Object Repeat Scheduling. --- Object Repeat Scheduling.
-- --
-- === -- ===
-- --
-- Author: FlightControl -- Author: FlightControl
-- Date Created: 13 Dec 2016 -- Date Created: 13 Dec 2016
-- --
-- # Situation -- # Situation
-- Three objects Test1, Test2, Test 3 are created with schedule a function. -- Three objects Test1, Test2, Test 3 are created with schedule a function.
-- After 15 seconds, Test1 is nillified and Garbage Collect is done. -- After 15 seconds, Test1 is nillified and Garbage Collect is done.
-- After 30 seconds, Test2 is nillified and Garbage Collect is done. -- After 30 seconds, Test2 is nillified and Garbage Collect is done.
-- After 45 seconds, Test3 is nillified and Garbage Collect is done. -- After 45 seconds, Test3 is nillified and Garbage Collect is done.
-- Uses the Tracing functions from BASE within the DCS.log file. Check the DCS.log file for the results. -- Uses the Tracing functions from BASE within the DCS.log file. Check the DCS.log file for the results.
-- Create a new SCHEDULER object. -- Create a new SCHEDULER object.
-- Check the DCS.log. -- Check the DCS.log.
-- --
-- --
-- Three Test objects are created. -- Three Test objects are created.
-- --
-- # Test cases: -- # Test cases:
-- --
-- 1. Object Test1 should start after 1 seconds showing every second "Hello World Repeat 1". -- 1. Object Test1 should start after 1 seconds showing every second "Hello World Repeat 1".
-- 2. Object Test2 should start after 2 seconds showing every 2 seconds "Hello World Repeat 2" and stop after one minute. -- 2. Object Test2 should start after 2 seconds showing every 2 seconds "Hello World Repeat 2" and stop after one minute.
-- 3. Object Test3 should start after 10 seconds showing with a 10 seconds randomized interval of 10 seconds "Hello World Repeat 3" and stop after one minute. -- 3. Object Test3 should start after 10 seconds showing with a 10 seconds randomized interval of 10 seconds "Hello World Repeat 3" and stop after one minute.
-- 4. After 15 seconds, Test1 should stop working. No "Hello World Repeat 1" may be shown after 15 seconds. -- 4. After 15 seconds, Test1 should stop working. No "Hello World Repeat 1" may be shown after 15 seconds.
-- 5. After 30 seconds, Test2 should stop working. No "Hello World Repeat 2" may be shown after 30 seconds. -- 5. After 30 seconds, Test2 should stop working. No "Hello World Repeat 2" may be shown after 30 seconds.
-- 6. After 45 seconds, Test3 should stop working. No "Hello World Repeat 3" may be shown after 45 seconds. -- 6. After 45 seconds, Test3 should stop working. No "Hello World Repeat 3" may be shown after 45 seconds.
-- --
-- # Status: TESTED - 13 Dec 2016 -- # Status: TESTED - 13 Dec 2016
local TEST_BASE = { local TEST_BASE = {
ClassName = "TEST_BASE", ClassName = "TEST_BASE",
} }
function TEST_BASE:New( Message, Start, Repeat, Randomize, Stop ) function TEST_BASE:New( Message, Start, Repeat, Randomize, Stop )
self = BASE:Inherit( self, BASE:New() ) self = BASE:Inherit( self, BASE:New() )
self.TestScheduler = SCHEDULER:New( self, self.TestScheduler = SCHEDULER:New( self,
function( Object, Message ) function( Object, Message )
Object:E( Message ) Object:E( Message )
end, { Message }, Start, Repeat, Randomize, Stop end, { Message }, Start, Repeat, Randomize, Stop
) )
return self return self
end end
do do
local Test1 = TEST_BASE:New( "Hello World Repeat 1", 1, 1 ) local Test1 = TEST_BASE:New( "Hello World Repeat 1", 1, 1 )
-- Nillify Test1 after 15 seconds and garbage collect. -- Nillify Test1 after 15 seconds and garbage collect.
local Nil1 = SCHEDULER:New( nil, local Nil1 = SCHEDULER:New( nil,
function() function()
BASE:E( "Nillify Test1 and Garbage Collect" ) BASE:E( "Nillify Test1 and Garbage Collect" )
Test1 = nil Test1 = nil
collectgarbage() collectgarbage()
end, {}, 15 ) end, {}, 15 )
end end
local Test2 = TEST_BASE:New( "Hello World Repeat 2", 2, 2, 0, 60 ) local Test2 = TEST_BASE:New( "Hello World Repeat 2", 2, 2, 0, 60 )
local Test3 = TEST_BASE:New( "Hello World Repeat 3", 10, 10, 1.0, 60 ) local Test3 = TEST_BASE:New( "Hello World Repeat 3", 10, 10, 1.0, 60 )
-- Nillify Test2 after 30 seconds and garbage collect. -- Nillify Test2 after 30 seconds and garbage collect.
local Nil2 = SCHEDULER:New( nil, local Nil2 = SCHEDULER:New( nil,
function() function()
BASE:E( "Nillify Test2 and Garbage Collect" ) BASE:E( "Nillify Test2 and Garbage Collect" )
Test2 = nil Test2 = nil
collectgarbage() collectgarbage()
end, {}, 30 ) end, {}, 30 )
-- Nillify Test3 after 45 seconds and garbage collect. -- Nillify Test3 after 45 seconds and garbage collect.
local Nil3 = SCHEDULER:New( nil, local Nil3 = SCHEDULER:New( nil,
function() function()
BASE:E( "Nillify Test3 and Garbage Collect" ) BASE:E( "Nillify Test3 and Garbage Collect" )
Test3 = nil Test3 = nil
collectgarbage() collectgarbage()
end, {}, 45 ) end, {}, 45 )
collectgarbage() collectgarbage()
@@ -1,16 +1,16 @@
BlueAirbaseSet = SET_AIRBASE:New():FilterCoalitions("blue"):FilterStart() BlueAirbaseSet = SET_AIRBASE:New():FilterCoalitions("blue"):FilterStart()
RedAirbaseSet = SET_AIRBASE:New():FilterCoalitions("red"):FilterStart() RedAirbaseSet = SET_AIRBASE:New():FilterCoalitions("red"):FilterStart()
RedAirbaseHelipadSet = SET_AIRBASE:New():FilterCoalitions("red"):FilterCategories("helipad"):FilterStart() RedAirbaseHelipadSet = SET_AIRBASE:New():FilterCoalitions("red"):FilterCategories("helipad"):FilterStart()
BlueAirbaseShipSet = SET_AIRBASE:New():FilterCoalitions("blue"):FilterCategories("ship"):FilterStart() BlueAirbaseShipSet = SET_AIRBASE:New():FilterCoalitions("blue"):FilterCategories("ship"):FilterStart()
BlueAirbaseSet:Flush() BlueAirbaseSet:Flush()
RedAirbaseSet:Flush() RedAirbaseSet:Flush()
RedAirbaseHelipadSet:Flush() RedAirbaseHelipadSet:Flush()
BlueAirbaseShipSet:Flush() BlueAirbaseShipSet:Flush()
@@ -1,34 +1,34 @@
--- ---
-- Name: SET-102 - Test SET_GROUP object against ZONE -- Name: SET-102 - Test SET_GROUP object against ZONE
-- Author: FlightControl -- Author: FlightControl
-- Date Created: 31 Mar 2017 -- Date Created: 31 Mar 2017
-- --
-- # Situation: -- # Situation:
-- --
-- A ZONE has been defined, and the SET_GROUP object is checked against the zone. -- A ZONE has been defined, and the SET_GROUP object is checked against the zone.
-- --
-- # Test cases: -- # Test cases:
-- --
-- 1. Observe the zone perimeter, and place the SET_GROUP object in or out of the zone. -- 1. Observe the zone perimeter, and place the SET_GROUP object in or out of the zone.
-- 2. Observe the results of the functions. -- 2. Observe the results of the functions.
SetGroupObject = SET_GROUP:New():FilterCoalitions("blue"):FilterPrefixes("Group Object"):FilterStart() SetGroupObject = SET_GROUP:New():FilterCoalitions("blue"):FilterPrefixes("Group Object"):FilterStart()
Zone = ZONE:New( "Zone" ) Zone = ZONE:New( "Zone" )
SetGroupObject:ForEachGroupCompletelyInZone( Zone, SetGroupObject:ForEachGroupCompletelyInZone( Zone,
function( GroupObject ) function( GroupObject )
GroupObject:E( { GroupObject:GetName(), "I am completely in Zone" } ) GroupObject:E( { GroupObject:GetName(), "I am completely in Zone" } )
end ) end )
SetGroupObject:ForEachGroupPartlyInZone( Zone, SetGroupObject:ForEachGroupPartlyInZone( Zone,
function( GroupObject ) function( GroupObject )
GroupObject:E( { GroupObject:GetName(), "I am partially in Zone" } ) GroupObject:E( { GroupObject:GetName(), "I am partially in Zone" } )
end ) end )
SetGroupObject:ForEachGroupNotInZone( Zone, SetGroupObject:ForEachGroupNotInZone( Zone,
function( GroupObject ) function( GroupObject )
GroupObject:E( { GroupObject:GetName(), "I am not in Zone" } ) GroupObject:E( { GroupObject:GetName(), "I am not in Zone" } )
end ) end )
@@ -1,24 +1,24 @@
--- ---
-- Name: ZON-103 - Test if GROUP object is in ZONE -- Name: ZON-103 - Test if GROUP object is in ZONE
-- Author: FlightControl -- Author: FlightControl
-- Date Created: 31 Mar 2017 -- Date Created: 31 Mar 2017
-- --
-- # Situation: -- # Situation:
-- --
-- A ZONE has been defined, and it is checked if a GROUP object is within the zone. -- A ZONE has been defined, and it is checked if a GROUP object is within the zone.
-- --
-- # Test cases: -- # Test cases:
-- --
-- 1. Observe the zone perimeter, and place the GROUP object in or out of the zone. -- 1. Observe the zone perimeter, and place the GROUP object in or out of the zone.
-- 2. Observe the results of the functions. -- 2. Observe the results of the functions.
GroupObject = GROUP:FindByName( "Group Object" ) GroupObject = GROUP:FindByName( "Group Object" )
Zone = ZONE:New( "Zone" ) Zone = ZONE:New( "Zone" )
Zone:E( { "Group is completely in Zone:", GroupObject:IsCompletelyInZone( Zone ) } ) Zone:E( { "Group is completely in Zone:", GroupObject:IsCompletelyInZone( Zone ) } )
Zone:E( { "Group is partially in Zone:", GroupObject:IsPartlyInZone( Zone ) } ) Zone:E( { "Group is partially in Zone:", GroupObject:IsPartlyInZone( Zone ) } )
Zone:E( { "Group is not in Zone:", GroupObject:IsNotInZone( Zone ) } ) Zone:E( { "Group is not in Zone:", GroupObject:IsNotInZone( Zone ) } )
@@ -1,17 +1,17 @@
--- ---
-- Name: SET-103 - Test SET_GROUP players added and deleted -- Name: SET-103 - Test SET_GROUP players added and deleted
-- Author: FlightControl -- Author: FlightControl
-- Date Created: 31 Mar 2017 -- Date Created: 31 Mar 2017
-- --
-- # Situation: -- # Situation:
-- --
-- Multiple groups of ground vehicles have been defined. -- Multiple groups of ground vehicles have been defined.
-- There are collected in a SET_GROUP. -- There are collected in a SET_GROUP.
-- A human player is jumping into the seat on one of these vehicles of the SET_GROUP. -- A human player is jumping into the seat on one of these vehicles of the SET_GROUP.
-- --
-- # Test cases: -- # Test cases:
-- --
-- 1. Observe the player added and deleted from the SET_GROUP depending on the behaviour. -- 1. Observe the player added and deleted from the SET_GROUP depending on the behaviour.
SetGroupObject = SET_GROUP:New():FilterCoalitions("blue"):FilterPrefixes("Group Object"):FilterStart() SetGroupObject = SET_GROUP:New():FilterCoalitions("blue"):FilterPrefixes("Group Object"):FilterStart()
@@ -1,3 +1,3 @@
SetClient = SET_CLIENT:New():FilterCoalitions("blue"):FilterCategories("plane"):FilterCountries("USA"):FilterStart() SetClient = SET_CLIENT:New():FilterCoalitions("blue"):FilterCategories("plane"):FilterCountries("USA"):FilterStart()
@@ -1,163 +1,163 @@
SetVehicles = SET_GROUP:New() SetVehicles = SET_GROUP:New()
SetVehicles:AddGroupsByName( { "Vehicle A", "Vehicle B", "Vehicle C" } ) SetVehicles:AddGroupsByName( { "Vehicle A", "Vehicle B", "Vehicle C" } )
SetVehicles:ForEachGroup( SetVehicles:ForEachGroup(
--- @param Wrapper.Group#GROUP MooseGroup --- @param Wrapper.Group#GROUP MooseGroup
function( MooseGroup ) function( MooseGroup )
for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do
local UnitAction = UnitData -- Wrapper.Unit#UNIT local UnitAction = UnitData -- Wrapper.Unit#UNIT
UnitAction:SmokeGreen() UnitAction:SmokeGreen()
end end
end end
) )
SetBluePlanesGroup = SET_GROUP:New() SetBluePlanesGroup = SET_GROUP:New()
:FilterCoalitions( "blue" ) :FilterCoalitions( "blue" )
:FilterCategories( "plane" ) :FilterCategories( "plane" )
:FilterStart() :FilterStart()
SetNorthKoreaGroup = SET_GROUP:New() SetNorthKoreaGroup = SET_GROUP:New()
:FilterCountries( "RUSSIA" ) :FilterCountries( "RUSSIA" )
:FilterStart() :FilterStart()
SetSAMGroup = SET_GROUP:New() SetSAMGroup = SET_GROUP:New()
:FilterPrefixes( "SAM" ) :FilterPrefixes( "SAM" )
:FilterStart() :FilterStart()
:SetIteratorIntervals( 5, 10 ) :SetIteratorIntervals( 5, 10 )
SetGroundGroup = SET_GROUP:New() SetGroundGroup = SET_GROUP:New()
:FilterCategories( "ground" ) :FilterCategories( "ground" )
:FilterStart() :FilterStart()
SetGroundGroup:Flush() SetGroundGroup:Flush()
SpawnUS_Plane = SPAWN:New( 'Spawn Test USA Plane') SpawnUS_Plane = SPAWN:New( 'Spawn Test USA Plane')
GroupUS_Plane = SpawnUS_Plane:Spawn() GroupUS_Plane = SpawnUS_Plane:Spawn()
SpawnUS_Vehicle = SPAWN:New( 'Spawn Test USA Vehicle') SpawnUS_Vehicle = SPAWN:New( 'Spawn Test USA Vehicle')
GroupUS_Vehicle = SpawnUS_Vehicle:Spawn() GroupUS_Vehicle = SpawnUS_Vehicle:Spawn()
SpawnUS_Ship = SPAWN:New( 'Spawn Test USA Ship') SpawnUS_Ship = SPAWN:New( 'Spawn Test USA Ship')
GroupUS_Ship = SpawnUS_Ship:Spawn() GroupUS_Ship = SpawnUS_Ship:Spawn()
SpawnRU_Vehicle = SPAWN:New( 'Spawn Test RUSSIA Vehicle') SpawnRU_Vehicle = SPAWN:New( 'Spawn Test RUSSIA Vehicle')
GroupRU_Vehicle = SpawnRU_Vehicle:Spawn() GroupRU_Vehicle = SpawnRU_Vehicle:Spawn()
SpawnRU_Ship = SPAWN:New( 'Spawn Test RUSSIA Ship') SpawnRU_Ship = SPAWN:New( 'Spawn Test RUSSIA Ship')
GroupRU_Ship = SpawnRU_Ship:Spawn() GroupRU_Ship = SpawnRU_Ship:Spawn()
SpawnM2A2_AttackVehicle = SPAWN:New( 'Spawn Test M2A2 Attack Vehicle' ):InitRandomizeUnits( true, 10, 4 ) SpawnM2A2_AttackVehicle = SPAWN:New( 'Spawn Test M2A2 Attack Vehicle' ):InitRandomizeUnits( true, 10, 4 )
SpawnSAM_AttackVehicle = SPAWN:New( 'Spawn Test SAM Attack Vehicle' ):InitRandomizeUnits( true, 10, 4 ) SpawnSAM_AttackVehicle = SPAWN:New( 'Spawn Test SAM Attack Vehicle' ):InitRandomizeUnits( true, 10, 4 )
for i = 1, 30 do for i = 1, 30 do
GroupM2A2_AttackVehicle = SpawnM2A2_AttackVehicle:SpawnInZone( ZONE:New("Spawn Zone") ) GroupM2A2_AttackVehicle = SpawnM2A2_AttackVehicle:SpawnInZone( ZONE:New("Spawn Zone") )
GroupSAM_AttackVehicle = SpawnSAM_AttackVehicle:SpawnInZone( ZONE:New("Spawn Zone") ) GroupSAM_AttackVehicle = SpawnSAM_AttackVehicle:SpawnInZone( ZONE:New("Spawn Zone") )
end end
SetVehicleCompletely = SET_GROUP:New() SetVehicleCompletely = SET_GROUP:New()
:FilterPrefixes( "Spawn Vehicle Zone Completely" ) :FilterPrefixes( "Spawn Vehicle Zone Completely" )
:FilterStart() :FilterStart()
SetVehiclePartly = SET_GROUP:New() SetVehiclePartly = SET_GROUP:New()
:FilterPrefixes( "Spawn Vehicle Zone Partly" ) :FilterPrefixes( "Spawn Vehicle Zone Partly" )
:FilterStart() :FilterStart()
SetVehicleNot = SET_GROUP:New() SetVehicleNot = SET_GROUP:New()
:FilterPrefixes( "Spawn Vehicle Zone Not" ) :FilterPrefixes( "Spawn Vehicle Zone Not" )
:FilterStart() :FilterStart()
Spawn_Vehicle_Zone_Completely = SPAWN:New( 'Spawn Vehicle Zone Completely' ):InitRandomizeUnits( true, 10, 4) Spawn_Vehicle_Zone_Completely = SPAWN:New( 'Spawn Vehicle Zone Completely' ):InitRandomizeUnits( true, 10, 4)
Spawn_Vehicle_Zone_Partly = SPAWN:New( 'Spawn Vehicle Zone Partly' ):InitRandomizeUnits( true, 10, 4 ) Spawn_Vehicle_Zone_Partly = SPAWN:New( 'Spawn Vehicle Zone Partly' ):InitRandomizeUnits( true, 10, 4 )
Spawn_Vehicle_Zone_Not = SPAWN:New( 'Spawn Vehicle Zone Not' ):InitRandomizeUnits( true, 10, 4 ) Spawn_Vehicle_Zone_Not = SPAWN:New( 'Spawn Vehicle Zone Not' ):InitRandomizeUnits( true, 10, 4 )
for i = 1, 30 do for i = 1, 30 do
Spawn_Vehicle_Zone_Completely:SpawnInZone( ZONE:New("Spawn Zone Completely") ) Spawn_Vehicle_Zone_Completely:SpawnInZone( ZONE:New("Spawn Zone Completely") )
Spawn_Vehicle_Zone_Partly:SpawnInZone( ZONE:New("Spawn Zone Partly") ) Spawn_Vehicle_Zone_Partly:SpawnInZone( ZONE:New("Spawn Zone Partly") )
Spawn_Vehicle_Zone_Not:SpawnInZone( ZONE:New("Spawn Zone Not") ) Spawn_Vehicle_Zone_Not:SpawnInZone( ZONE:New("Spawn Zone Not") )
end end
--DBBlue:TraceDatabase() --DBBlue:TraceDatabase()
--SCHEDULER:New( DBBluePlanes, DBBluePlanes.Flush, { }, 1 ) --SCHEDULER:New( DBBluePlanes, DBBluePlanes.Flush, { }, 1 )
--SCHEDULER:New( DBRedVehicles, DBRedVehicles.Flush, { }, 1 ) --SCHEDULER:New( DBRedVehicles, DBRedVehicles.Flush, { }, 1 )
--SCHEDULER:New( DBShips, DBShips.Flush, { }, 1 ) --SCHEDULER:New( DBShips, DBShips.Flush, { }, 1 )
--SCHEDULER:New( DBBelgium, DBBelgium.Flush, { }, 1 ) --SCHEDULER:New( DBBelgium, DBBelgium.Flush, { }, 1 )
--SCHEDULER:New( DBNorthKorea, DBNorthKorea.Flush, { }, 1 ) --SCHEDULER:New( DBNorthKorea, DBNorthKorea.Flush, { }, 1 )
--SCHEDULER:New( DBKA50Vinson, DBKA50Vinson.Flush, { }, 1 ) --SCHEDULER:New( DBKA50Vinson, DBKA50Vinson.Flush, { }, 1 )
-- --
--SCHEDULER:New( DBBluePlanesGroup, DBBluePlanesGroup.Flush, { }, 1 ) --SCHEDULER:New( DBBluePlanesGroup, DBBluePlanesGroup.Flush, { }, 1 )
--SCHEDULER:New( DBNorthKoreaGroup, DBNorthKoreaGroup.Flush, { }, 1 ) --SCHEDULER:New( DBNorthKoreaGroup, DBNorthKoreaGroup.Flush, { }, 1 )
SetBluePlanesGroup:ForEachGroup( SetBluePlanesGroup:ForEachGroup(
--- @param Wrapper.Group#GROUP MooseGroup --- @param Wrapper.Group#GROUP MooseGroup
function( MooseGroup ) function( MooseGroup )
for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do
local UnitAction = UnitData -- Wrapper.Unit#UNIT local UnitAction = UnitData -- Wrapper.Unit#UNIT
UnitAction:SmokeBlue() UnitAction:SmokeBlue()
end end
end end
) )
SetNorthKoreaGroup:ForEachGroup( SetNorthKoreaGroup:ForEachGroup(
--- @param Wrapper.Group#GROUP MooseGroup --- @param Wrapper.Group#GROUP MooseGroup
function( MooseGroup ) function( MooseGroup )
for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do
local UnitAction = UnitData -- Wrapper.Unit#UNIT local UnitAction = UnitData -- Wrapper.Unit#UNIT
UnitAction:SmokeRed() UnitAction:SmokeRed()
end end
end end
) )
SetSAMGroup:ForEachGroup( SetSAMGroup:ForEachGroup(
--- @param Wrapper.Group#GROUP MooseGroup --- @param Wrapper.Group#GROUP MooseGroup
function( MooseGroup ) function( MooseGroup )
for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do
local UnitAction = UnitData -- Wrapper.Unit#UNIT local UnitAction = UnitData -- Wrapper.Unit#UNIT
UnitAction:SmokeOrange() UnitAction:SmokeOrange()
end end
end end
) )
GroupZoneCompletely = GROUP:FindByName( "Zone Completely" ) GroupZoneCompletely = GROUP:FindByName( "Zone Completely" )
GroupZonePartly = GROUP:FindByName( "Zone Partly" ) GroupZonePartly = GROUP:FindByName( "Zone Partly" )
GroupZoneNot = GROUP:FindByName( "Zone Not" ) GroupZoneNot = GROUP:FindByName( "Zone Not" )
ZoneCompletely = ZONE_POLYGON:New( "Zone Completely", GroupZoneCompletely ):SmokeZone( SMOKECOLOR.White ) ZoneCompletely = ZONE_POLYGON:New( "Zone Completely", GroupZoneCompletely ):SmokeZone( SMOKECOLOR.White )
ZonePartly = ZONE_POLYGON:New( "Zone Partly", GroupZonePartly ):SmokeZone( SMOKECOLOR.White ) ZonePartly = ZONE_POLYGON:New( "Zone Partly", GroupZonePartly ):SmokeZone( SMOKECOLOR.White )
ZoneNot = ZONE_POLYGON:New( "Zone Not", GroupZoneNot ):SmokeZone( SMOKECOLOR.White ) ZoneNot = ZONE_POLYGON:New( "Zone Not", GroupZoneNot ):SmokeZone( SMOKECOLOR.White )
SetVehicleCompletely:ForEachGroupCompletelyInZone( ZoneCompletely, SetVehicleCompletely:ForEachGroupCompletelyInZone( ZoneCompletely,
--- @param Wrapper.Group#GROUP MooseGroup --- @param Wrapper.Group#GROUP MooseGroup
function( MooseGroup ) function( MooseGroup )
for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do
local UnitAction = UnitData -- Wrapper.Unit#UNIT local UnitAction = UnitData -- Wrapper.Unit#UNIT
UnitAction:SmokeBlue() UnitAction:SmokeBlue()
end end
end end
) )
SetVehiclePartly:ForEachGroupPartlyInZone( ZonePartly, SetVehiclePartly:ForEachGroupPartlyInZone( ZonePartly,
--- @param Wrapper.Group#GROUP MooseGroup --- @param Wrapper.Group#GROUP MooseGroup
function( MooseGroup ) function( MooseGroup )
for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do
local UnitAction = UnitData -- Wrapper.Unit#UNIT local UnitAction = UnitData -- Wrapper.Unit#UNIT
UnitAction:SmokeBlue() UnitAction:SmokeBlue()
end end
end end
) )
SetVehicleNot:ForEachGroupNotInZone( ZoneNot, SetVehicleNot:ForEachGroupNotInZone( ZoneNot,
--- @param Wrapper.Group#GROUP MooseGroup --- @param Wrapper.Group#GROUP MooseGroup
function( MooseGroup ) function( MooseGroup )
for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do
local UnitAction = UnitData -- Wrapper.Unit#UNIT local UnitAction = UnitData -- Wrapper.Unit#UNIT
UnitAction:SmokeBlue() UnitAction:SmokeBlue()
end end
end end
) )
@@ -1,163 +1,163 @@
SetVehicles = SET_GROUP:New() SetVehicles = SET_GROUP:New()
SetVehicles:AddGroupsByName( { "Vehicle A", "Vehicle B", "Vehicle C" } ) SetVehicles:AddGroupsByName( { "Vehicle A", "Vehicle B", "Vehicle C" } )
SetVehicles:ForEachGroup( SetVehicles:ForEachGroup(
--- @param Wrapper.Group#GROUP MooseGroup --- @param Wrapper.Group#GROUP MooseGroup
function( MooseGroup ) function( MooseGroup )
for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do
local UnitAction = UnitData -- Wrapper.Unit#UNIT local UnitAction = UnitData -- Wrapper.Unit#UNIT
UnitAction:SmokeGreen() UnitAction:SmokeGreen()
end end
end end
) )
SetBluePlanesGroup = SET_GROUP:New() SetBluePlanesGroup = SET_GROUP:New()
:FilterCoalitions( "blue" ) :FilterCoalitions( "blue" )
:FilterCategories( "plane" ) :FilterCategories( "plane" )
:FilterStart() :FilterStart()
SetNorthKoreaGroup = SET_GROUP:New() SetNorthKoreaGroup = SET_GROUP:New()
:FilterCountries( "RUSSIA" ) :FilterCountries( "RUSSIA" )
:FilterStart() :FilterStart()
SetSAMGroup = SET_GROUP:New() SetSAMGroup = SET_GROUP:New()
:FilterPrefixes( "SAM" ) :FilterPrefixes( "SAM" )
:FilterStart() :FilterStart()
:SetIteratorIntervals( 5, 10 ) :SetIteratorIntervals( 5, 10 )
SetGroundGroup = SET_GROUP:New() SetGroundGroup = SET_GROUP:New()
:FilterCategories( "ground" ) :FilterCategories( "ground" )
:FilterStart() :FilterStart()
SetGroundGroup:Flush() SetGroundGroup:Flush()
SpawnUS_Plane = SPAWN:New( 'Spawn Test USA Plane') SpawnUS_Plane = SPAWN:New( 'Spawn Test USA Plane')
GroupUS_Plane = SpawnUS_Plane:Spawn() GroupUS_Plane = SpawnUS_Plane:Spawn()
SpawnUS_Vehicle = SPAWN:New( 'Spawn Test USA Vehicle') SpawnUS_Vehicle = SPAWN:New( 'Spawn Test USA Vehicle')
GroupUS_Vehicle = SpawnUS_Vehicle:Spawn() GroupUS_Vehicle = SpawnUS_Vehicle:Spawn()
SpawnUS_Ship = SPAWN:New( 'Spawn Test USA Ship') SpawnUS_Ship = SPAWN:New( 'Spawn Test USA Ship')
GroupUS_Ship = SpawnUS_Ship:Spawn() GroupUS_Ship = SpawnUS_Ship:Spawn()
SpawnRU_Vehicle = SPAWN:New( 'Spawn Test RUSSIA Vehicle') SpawnRU_Vehicle = SPAWN:New( 'Spawn Test RUSSIA Vehicle')
GroupRU_Vehicle = SpawnRU_Vehicle:Spawn() GroupRU_Vehicle = SpawnRU_Vehicle:Spawn()
SpawnRU_Ship = SPAWN:New( 'Spawn Test RUSSIA Ship') SpawnRU_Ship = SPAWN:New( 'Spawn Test RUSSIA Ship')
GroupRU_Ship = SpawnRU_Ship:Spawn() GroupRU_Ship = SpawnRU_Ship:Spawn()
SpawnM2A2_AttackVehicle = SPAWN:New( 'Spawn Test M2A2 Attack Vehicle' ):InitRandomizeUnits( true, 10, 4 ) SpawnM2A2_AttackVehicle = SPAWN:New( 'Spawn Test M2A2 Attack Vehicle' ):InitRandomizeUnits( true, 10, 4 )
SpawnSAM_AttackVehicle = SPAWN:New( 'Spawn Test SAM Attack Vehicle' ):InitRandomizeUnits( true, 10, 4 ) SpawnSAM_AttackVehicle = SPAWN:New( 'Spawn Test SAM Attack Vehicle' ):InitRandomizeUnits( true, 10, 4 )
for i = 1, 30 do for i = 1, 30 do
GroupM2A2_AttackVehicle = SpawnM2A2_AttackVehicle:SpawnInZone( ZONE:New("Spawn Zone") ) GroupM2A2_AttackVehicle = SpawnM2A2_AttackVehicle:SpawnInZone( ZONE:New("Spawn Zone") )
GroupSAM_AttackVehicle = SpawnSAM_AttackVehicle:SpawnInZone( ZONE:New("Spawn Zone") ) GroupSAM_AttackVehicle = SpawnSAM_AttackVehicle:SpawnInZone( ZONE:New("Spawn Zone") )
end end
SetVehicleCompletely = SET_GROUP:New() SetVehicleCompletely = SET_GROUP:New()
:FilterPrefixes( "Spawn Vehicle Zone Completely" ) :FilterPrefixes( "Spawn Vehicle Zone Completely" )
:FilterStart() :FilterStart()
SetVehiclePartly = SET_GROUP:New() SetVehiclePartly = SET_GROUP:New()
:FilterPrefixes( "Spawn Vehicle Zone Partly" ) :FilterPrefixes( "Spawn Vehicle Zone Partly" )
:FilterStart() :FilterStart()
SetVehicleNot = SET_GROUP:New() SetVehicleNot = SET_GROUP:New()
:FilterPrefixes( "Spawn Vehicle Zone Not" ) :FilterPrefixes( "Spawn Vehicle Zone Not" )
:FilterStart() :FilterStart()
Spawn_Vehicle_Zone_Completely = SPAWN:New( 'Spawn Vehicle Zone Completely' ):InitRandomizeUnits( true, 10, 4) Spawn_Vehicle_Zone_Completely = SPAWN:New( 'Spawn Vehicle Zone Completely' ):InitRandomizeUnits( true, 10, 4)
Spawn_Vehicle_Zone_Partly = SPAWN:New( 'Spawn Vehicle Zone Partly' ):InitRandomizeUnits( true, 10, 4 ) Spawn_Vehicle_Zone_Partly = SPAWN:New( 'Spawn Vehicle Zone Partly' ):InitRandomizeUnits( true, 10, 4 )
Spawn_Vehicle_Zone_Not = SPAWN:New( 'Spawn Vehicle Zone Not' ):InitRandomizeUnits( true, 10, 4 ) Spawn_Vehicle_Zone_Not = SPAWN:New( 'Spawn Vehicle Zone Not' ):InitRandomizeUnits( true, 10, 4 )
for i = 1, 30 do for i = 1, 30 do
Spawn_Vehicle_Zone_Completely:SpawnInZone( ZONE:New("Spawn Zone Completely") ) Spawn_Vehicle_Zone_Completely:SpawnInZone( ZONE:New("Spawn Zone Completely") )
Spawn_Vehicle_Zone_Partly:SpawnInZone( ZONE:New("Spawn Zone Partly") ) Spawn_Vehicle_Zone_Partly:SpawnInZone( ZONE:New("Spawn Zone Partly") )
Spawn_Vehicle_Zone_Not:SpawnInZone( ZONE:New("Spawn Zone Not") ) Spawn_Vehicle_Zone_Not:SpawnInZone( ZONE:New("Spawn Zone Not") )
end end
--DBBlue:TraceDatabase() --DBBlue:TraceDatabase()
--SCHEDULER:New( DBBluePlanes, DBBluePlanes.Flush, { }, 1 ) --SCHEDULER:New( DBBluePlanes, DBBluePlanes.Flush, { }, 1 )
--SCHEDULER:New( DBRedVehicles, DBRedVehicles.Flush, { }, 1 ) --SCHEDULER:New( DBRedVehicles, DBRedVehicles.Flush, { }, 1 )
--SCHEDULER:New( DBShips, DBShips.Flush, { }, 1 ) --SCHEDULER:New( DBShips, DBShips.Flush, { }, 1 )
--SCHEDULER:New( DBBelgium, DBBelgium.Flush, { }, 1 ) --SCHEDULER:New( DBBelgium, DBBelgium.Flush, { }, 1 )
--SCHEDULER:New( DBNorthKorea, DBNorthKorea.Flush, { }, 1 ) --SCHEDULER:New( DBNorthKorea, DBNorthKorea.Flush, { }, 1 )
--SCHEDULER:New( DBKA50Vinson, DBKA50Vinson.Flush, { }, 1 ) --SCHEDULER:New( DBKA50Vinson, DBKA50Vinson.Flush, { }, 1 )
-- --
--SCHEDULER:New( DBBluePlanesGroup, DBBluePlanesGroup.Flush, { }, 1 ) --SCHEDULER:New( DBBluePlanesGroup, DBBluePlanesGroup.Flush, { }, 1 )
--SCHEDULER:New( DBNorthKoreaGroup, DBNorthKoreaGroup.Flush, { }, 1 ) --SCHEDULER:New( DBNorthKoreaGroup, DBNorthKoreaGroup.Flush, { }, 1 )
SetBluePlanesGroup:ForEachGroup( SetBluePlanesGroup:ForEachGroup(
--- @param Wrapper.Group#GROUP MooseGroup --- @param Wrapper.Group#GROUP MooseGroup
function( MooseGroup ) function( MooseGroup )
for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do
local UnitAction = UnitData -- Wrapper.Unit#UNIT local UnitAction = UnitData -- Wrapper.Unit#UNIT
UnitAction:SmokeBlue() UnitAction:SmokeBlue()
end end
end end
) )
SetNorthKoreaGroup:ForEachGroup( SetNorthKoreaGroup:ForEachGroup(
--- @param Wrapper.Group#GROUP MooseGroup --- @param Wrapper.Group#GROUP MooseGroup
function( MooseGroup ) function( MooseGroup )
for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do
local UnitAction = UnitData -- Wrapper.Unit#UNIT local UnitAction = UnitData -- Wrapper.Unit#UNIT
UnitAction:SmokeRed() UnitAction:SmokeRed()
end end
end end
) )
SetSAMGroup:ForEachGroup( SetSAMGroup:ForEachGroup(
--- @param Wrapper.Group#GROUP MooseGroup --- @param Wrapper.Group#GROUP MooseGroup
function( MooseGroup ) function( MooseGroup )
for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do
local UnitAction = UnitData -- Wrapper.Unit#UNIT local UnitAction = UnitData -- Wrapper.Unit#UNIT
UnitAction:SmokeOrange() UnitAction:SmokeOrange()
end end
end end
) )
GroupZoneCompletely = GROUP:FindByName( "Zone Completely" ) GroupZoneCompletely = GROUP:FindByName( "Zone Completely" )
GroupZonePartly = GROUP:FindByName( "Zone Partly" ) GroupZonePartly = GROUP:FindByName( "Zone Partly" )
GroupZoneNot = GROUP:FindByName( "Zone Not" ) GroupZoneNot = GROUP:FindByName( "Zone Not" )
ZoneCompletely = ZONE_POLYGON:New( "Zone Completely", GroupZoneCompletely ):SmokeZone( SMOKECOLOR.White ) ZoneCompletely = ZONE_POLYGON:New( "Zone Completely", GroupZoneCompletely ):SmokeZone( SMOKECOLOR.White )
ZonePartly = ZONE_POLYGON:New( "Zone Partly", GroupZonePartly ):SmokeZone( SMOKECOLOR.White ) ZonePartly = ZONE_POLYGON:New( "Zone Partly", GroupZonePartly ):SmokeZone( SMOKECOLOR.White )
ZoneNot = ZONE_POLYGON:New( "Zone Not", GroupZoneNot ):SmokeZone( SMOKECOLOR.White ) ZoneNot = ZONE_POLYGON:New( "Zone Not", GroupZoneNot ):SmokeZone( SMOKECOLOR.White )
SetVehicleCompletely:ForEachGroupCompletelyInZone( ZoneCompletely, SetVehicleCompletely:ForEachGroupCompletelyInZone( ZoneCompletely,
--- @param Wrapper.Group#GROUP MooseGroup --- @param Wrapper.Group#GROUP MooseGroup
function( MooseGroup ) function( MooseGroup )
for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do
local UnitAction = UnitData -- Wrapper.Unit#UNIT local UnitAction = UnitData -- Wrapper.Unit#UNIT
UnitAction:SmokeBlue() UnitAction:SmokeBlue()
end end
end end
) )
SetVehiclePartly:ForEachGroupPartlyInZone( ZonePartly, SetVehiclePartly:ForEachGroupPartlyInZone( ZonePartly,
--- @param Wrapper.Group#GROUP MooseGroup --- @param Wrapper.Group#GROUP MooseGroup
function( MooseGroup ) function( MooseGroup )
for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do
local UnitAction = UnitData -- Wrapper.Unit#UNIT local UnitAction = UnitData -- Wrapper.Unit#UNIT
UnitAction:SmokeBlue() UnitAction:SmokeBlue()
end end
end end
) )
SetVehicleNot:ForEachGroupNotInZone( ZoneNot, SetVehicleNot:ForEachGroupNotInZone( ZoneNot,
--- @param Wrapper.Group#GROUP MooseGroup --- @param Wrapper.Group#GROUP MooseGroup
function( MooseGroup ) function( MooseGroup )
for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do
local UnitAction = UnitData -- Wrapper.Unit#UNIT local UnitAction = UnitData -- Wrapper.Unit#UNIT
UnitAction:SmokeBlue() UnitAction:SmokeBlue()
end end
end end
) )
@@ -1,8 +1,8 @@
-- The mission contains templates, which are late activated groups. Only the active groups should be included. -- The mission contains templates, which are late activated groups. Only the active groups should be included.
-- It should count 3 groups in DCS.log. -- It should count 3 groups in DCS.log.
SetGroup = SET_GROUP:New():FilterCoalitions("blue"):FilterCategories("ground"):FilterActive():FilterOnce() SetGroup = SET_GROUP:New():FilterCoalitions("blue"):FilterCategories("ground"):FilterActive():FilterOnce()
SetGroup:Flush() SetGroup:Flush()
SetGroup:I( { Count = SetGroup:Count() } ) SetGroup:I( { Count = SetGroup:Count() } )
MESSAGE:NewType( "There are " .. SetGroup:Count() .. " groups in the SetGroup.", MESSAGE.Type.Information ):ToAll() MESSAGE:NewType( "There are " .. SetGroup:Count() .. " groups in the SetGroup.", MESSAGE.Type.Information ):ToAll()
@@ -1,8 +1,8 @@
-- The mission contains templates, which are late activated groups. All groups should be included. -- The mission contains templates, which are late activated groups. All groups should be included.
-- It should count 7 groups in DCS.log. -- It should count 7 groups in DCS.log.
SetGroup = SET_GROUP:New():FilterCoalitions("blue"):FilterCategories("ground"):FilterOnce() SetGroup = SET_GROUP:New():FilterCoalitions("blue"):FilterCategories("ground"):FilterOnce()
SetGroup:Flush() SetGroup:Flush()
SetGroup:I( { Count = SetGroup:Count() } ) SetGroup:I( { Count = SetGroup:Count() } )
MESSAGE:NewType( "There are " .. SetGroup:Count() .. " groups in the SetGroup.", MESSAGE.Type.Information ):ToAll() MESSAGE:NewType( "There are " .. SetGroup:Count() .. " groups in the SetGroup.", MESSAGE.Type.Information ):ToAll()
@@ -1,58 +1,58 @@
------------------------------------------------------------------------- -------------------------------------------------------------------------
-- SET-SCENERY-100 - Scenery Set From Zone -- SET-SCENERY-100 - Scenery Set From Zone
------------------------------------------------------------------------- -------------------------------------------------------------------------
-- Documentation -- Documentation
-- --
-- SET_SCENERY: https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/Core.Set.html##(SET_SCENERY) -- SET_SCENERY: https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/Core.Set.html##(SET_SCENERY)
-- --
------------------------------------------------------------------------- -------------------------------------------------------------------------
-- Join the game master slot initially, and then the Tank in -- Join the game master slot initially, and then the Tank in
-- Combined Arms after a few seconds. Shoot and destroy on of the tanks -- Combined Arms after a few seconds. Shoot and destroy on of the tanks
-- ahead. -- ahead.
------------------------------------------------------------------------- -------------------------------------------------------------------------
-- Date: November 2022 -- Date: November 2022
------------------------------------------------------------------------- -------------------------------------------------------------------------
-- Get our ZONE object and draw it -- Get our ZONE object and draw it
local zone = ZONE:FindByName("OilTankZone") local zone = ZONE:FindByName("OilTankZone")
zone:DrawZone(-1,{0,0,1},nil,nil,nil,1) zone:DrawZone(-1,{0,0,1},nil,nil,nil,1)
-- Create a SET_SCENERY from the map objects in the zone -- Create a SET_SCENERY from the map objects in the zone
local oilstation = SET_SCENERY:NewFromZone(zone) local oilstation = SET_SCENERY:NewFromZone(zone)
-- we'll use this SET for further filtering -- we'll use this SET for further filtering
local oiltanks = SET_SCENERY:New() local oiltanks = SET_SCENERY:New()
-- An Airbase has a lot of map objects, but we only want to have tanks -- An Airbase has a lot of map objects, but we only want to have tanks
oilstation:ForEachScenery( oilstation:ForEachScenery(
function(object) function(object)
local scenery = object --Wrapper.Scenery#SCENERY local scenery = object --Wrapper.Scenery#SCENERY
local name = scenery:GetName() local name = scenery:GetName()
local desc = scenery:GetDesc() local desc = scenery:GetDesc()
BASE:I({desc.typeName}) BASE:I({desc.typeName})
if string.find(string.lower(desc.typeName),"tank") then if string.find(string.lower(desc.typeName),"tank") then
oiltanks:AddObject(scenery) oiltanks:AddObject(scenery)
end end
end end
) )
-- Count how many we have -- Count how many we have
local NumberTanks0 = oiltanks:CountAlive() local NumberTanks0 = oiltanks:CountAlive()
-- user flag OilTanks will be zero initially -- user flag OilTanks will be zero initially
local flag = USERFLAG:New("OilTanks") local flag = USERFLAG:New("OilTanks")
flag:Set(0) flag:Set(0)
-- Function to check number of alive tanks regularly -- Function to check number of alive tanks regularly
function CheckOnOilTanks(TankSet,InitialNo,Threshold) function CheckOnOilTanks(TankSet,InitialNo,Threshold)
local NumberTanks = TankSet:CountAlive() local NumberTanks = TankSet:CountAlive()
MESSAGE:New("Oil Tanks alive: "..NumberTanks,15,"OilTanks"):ToAll() MESSAGE:New("Oil Tanks alive: "..NumberTanks,15,"OilTanks"):ToAll()
if NumberTanks <= InitialNo*Threshold then if NumberTanks <= InitialNo*Threshold then
-- Success! -- Success!
MESSAGE:New("Success! Oil Tanks have been diminished!",15,"OilTanks"):ToAll() MESSAGE:New("Success! Oil Tanks have been diminished!",15,"OilTanks"):ToAll()
-- Set a Flag in Mission Editor -- Set a Flag in Mission Editor
flag:Set(999) flag:Set(999)
end end
end end
-- Create a timer to run the check function -- Create a timer to run the check function
local TankTimer = TIMER:New(CheckOnOilTanks,oiltanks,NumberTanks0,0.2) local TankTimer = TIMER:New(CheckOnOilTanks,oiltanks,NumberTanks0,0.2)
-- check every minute -- check every minute
TankTimer:Start(10,30,3600) TankTimer:Start(10,30,3600)
@@ -1,7 +1,7 @@
SetUnit = SET_UNIT:New():FilterCoalitions("blue"):FilterCategories("ground"):FilterOnce() SetUnit = SET_UNIT:New():FilterCoalitions("blue"):FilterCategories("ground"):FilterOnce()
SetUnit:Flush() SetUnit:Flush()
SetUnit:I(SetUnit:Count()) SetUnit:I(SetUnit:Count())
@@ -1,12 +1,12 @@
SetUnit = SET_UNIT:New():FilterCoalitions("blue"):FilterCategories("ground"):FilterOnce() SetUnit = SET_UNIT:New():FilterCoalitions("blue"):FilterCategories("ground"):FilterOnce()
SetUnit:Flush() SetUnit:Flush()
SetUnit:I( { Count = SetUnit:Count() } ) SetUnit:I( { Count = SetUnit:Count() } )
SCHEDULER:New( nil, SCHEDULER:New( nil,
function() function()
SetUnit = SET_UNIT:New():FilterCoalitions("blue"):FilterCategories("ground"):FilterOnce() SetUnit = SET_UNIT:New():FilterCoalitions("blue"):FilterCategories("ground"):FilterOnce()
SetUnit:Flush() SetUnit:Flush()
SetUnit:I( { Count = SetUnit:Count() } ) SetUnit:I( { Count = SetUnit:Count() } )
end, {}, 60 ) end, {}, 60 )
@@ -1,16 +1,16 @@
SCHEDULER:New( nil, SCHEDULER:New( nil,
function() function()
SetUnit = SET_UNIT:New():FilterCoalitions("blue"):FilterCategories("ground"):FilterOnce() SetUnit = SET_UNIT:New():FilterCoalitions("blue"):FilterCategories("ground"):FilterOnce()
SetUnit:Flush() SetUnit:Flush()
SetUnit:I( { Count = SetUnit:Count() } ) SetUnit:I( { Count = SetUnit:Count() } )
end, {}, 0, 30 ) end, {}, 0, 30 )
GroupPlanes = GROUP:FindByName( "Planes #001" ) GroupPlanes = GROUP:FindByName( "Planes #001" )
GroupPlanes:HandleEvent( EVENTS.EngineShutdown ) GroupPlanes:HandleEvent( EVENTS.EngineShutdown )
function GroupPlanes:OnEventEngineShutdown( EventData ) function GroupPlanes:OnEventEngineShutdown( EventData )
EventData.IniUnit:Destroy() EventData.IniUnit:Destroy()
end end
@@ -1,8 +1,8 @@
-- The mission contains templates, which are late activated groups. Only the active units should be included. -- The mission contains templates, which are late activated groups. Only the active units should be included.
-- It should count 24 units in DCS.log. -- It should count 24 units in DCS.log.
SetUnit = SET_UNIT:New():FilterCoalitions("blue"):FilterCategories("ground"):FilterActive():FilterOnce() SetUnit = SET_UNIT:New():FilterCoalitions("blue"):FilterCategories("ground"):FilterActive():FilterOnce()
SetUnit:Flush() SetUnit:Flush()
SetUnit:I( { Count = SetUnit:Count() } ) SetUnit:I( { Count = SetUnit:Count() } )
MESSAGE:NewType( "There are " .. SetUnit:Count() .. " units in the SetUnit.", MESSAGE.Type.Information ):ToAll() MESSAGE:NewType( "There are " .. SetUnit:Count() .. " units in the SetUnit.", MESSAGE.Type.Information ):ToAll()
@@ -1,22 +1,22 @@
-- Name: SPA-011 - Ground Ops - Simple Spawning -- Name: SPA-011 - Ground Ops - Simple Spawning
-- Author: FlightControl -- Author: FlightControl
-- Date Created: 10 Jan 2017 -- Date Created: 10 Jan 2017
-- --
-- # Situation: -- # Situation:
-- --
-- At Gudauta spawn a ground vehicle. -- At Gudauta spawn a ground vehicle.
-- --
-- # Test cases: -- # Test cases:
-- --
-- 1. Observe that the ground vehicle is spawned. -- 1. Observe that the ground vehicle is spawned.
-- Tests Gudauta -- Tests Gudauta
-- ------------- -- -------------
-- Spawn a gound vehicle... -- Spawn a gound vehicle...
Spawn_Vehicle_1 = SPAWN:New( "Spawn Vehicle 1" ) Spawn_Vehicle_1 = SPAWN:New( "Spawn Vehicle 1" )
Spawn_Group_1 = Spawn_Vehicle_1:Spawn() Spawn_Group_1 = Spawn_Vehicle_1:Spawn()
@@ -1,26 +1,26 @@
-- Name: SPA-012 - Ground Ops - Multiple Spawns -- Name: SPA-012 - Ground Ops - Multiple Spawns
-- Author: FlightControl -- Author: FlightControl
-- Date Created: 10 Jan 2017 -- Date Created: 10 Jan 2017
-- --
-- # Situation: -- # Situation:
-- --
-- At Gudauta spawn multiple ground vehicles. -- At Gudauta spawn multiple ground vehicles.
-- --
-- # Test cases: -- # Test cases:
-- --
-- 1. Observe that the ground vehicles are spawned at the position declared within the mission editor. -- 1. Observe that the ground vehicles are spawned at the position declared within the mission editor.
-- Tests Gudauta -- Tests Gudauta
-- ------------- -- -------------
-- Spawn a gound vehicle... -- Spawn a gound vehicle...
Spawn_Vehicle_1 = SPAWN:New( "Spawn Vehicle 1" ) Spawn_Vehicle_1 = SPAWN:New( "Spawn Vehicle 1" )
Spawn_Group_1 = Spawn_Vehicle_1:Spawn() Spawn_Group_1 = Spawn_Vehicle_1:Spawn()
Spawn_Group_2 = Spawn_Vehicle_1:Spawn() Spawn_Group_2 = Spawn_Vehicle_1:Spawn()
Spawn_Group_3 = Spawn_Vehicle_1:Spawn() Spawn_Group_3 = Spawn_Vehicle_1:Spawn()
Spawn_Group_4 = Spawn_Vehicle_1:Spawn() Spawn_Group_4 = Spawn_Vehicle_1:Spawn()
Spawn_Group_5 = Spawn_Vehicle_1:Spawn() Spawn_Group_5 = Spawn_Vehicle_1:Spawn()
@@ -1,22 +1,22 @@
-- Name: SPA-013 - Ground Ops - Scheduled Spawns -- Name: SPA-013 - Ground Ops - Scheduled Spawns
-- Author: FlightControl -- Author: FlightControl
-- Date Created: 10 Jan 2017 -- Date Created: 10 Jan 2017
-- --
-- # Situation: -- # Situation:
-- --
-- At Gudauta spawn multiple ground vehicles, in a scheduled fashion. -- At Gudauta spawn multiple ground vehicles, in a scheduled fashion.
-- --
-- # Test cases: -- # Test cases:
-- --
-- 1. Observe that the ground vehicles are spawned at the position declared within the mission editor. -- 1. Observe that the ground vehicles are spawned at the position declared within the mission editor.
-- 2. The vehicles should spawn according the scheduler parameters. -- 2. The vehicles should spawn according the scheduler parameters.
-- Tests Gudauta -- Tests Gudauta
-- ------------- -- -------------
Spawn_Vehicle_1 = SPAWN:New( "Spawn Vehicle 1" ):SpawnScheduled( 10, 0.5 ) Spawn_Vehicle_1 = SPAWN:New( "Spawn Vehicle 1" ):SpawnScheduled( 10, 0.5 )
@@ -1,21 +1,21 @@
-- Name: SPA-014 - Ground Ops - Scheduled Spawns Limited -- Name: SPA-014 - Ground Ops - Scheduled Spawns Limited
-- Author: FlightControl -- Author: FlightControl
-- Date Created: 10 Jan 2017 -- Date Created: 10 Jan 2017
-- --
-- # Situation: -- # Situation:
-- --
-- At Gudauta spawn multiple ground vehicles, in a scheduled fashion. -- At Gudauta spawn multiple ground vehicles, in a scheduled fashion.
-- --
-- # Test cases: -- # Test cases:
-- --
-- 1. Observe that the ground vehicles are spawned at the position declared within the mission editor. -- 1. Observe that the ground vehicles are spawned at the position declared within the mission editor.
-- 2. The vehicles should spawn according the scheduler parameters. -- 2. The vehicles should spawn according the scheduler parameters.
-- 3. There should not be more than 5 groups spawned. -- 3. There should not be more than 5 groups spawned.
-- Tests Gudauta -- Tests Gudauta
-- ------------- -- -------------
Spawn_Vehicle_1 = SPAWN:New( "Spawn Vehicle 1" ):InitLimit( 5, 0 ):SpawnScheduled( 5, .5 ) Spawn_Vehicle_1 = SPAWN:New( "Spawn Vehicle 1" ):InitLimit( 5, 0 ):SpawnScheduled( 5, .5 )
@@ -1,27 +1,27 @@
-- Name: SPA-015 - Ground Ops - Randomize Route -- Name: SPA-015 - Ground Ops - Randomize Route
-- Author: FlightControl -- Author: FlightControl
-- Date Created: 10 Jan 2017 -- Date Created: 10 Jan 2017
-- --
-- # Situation: -- # Situation:
-- --
-- At Gudauta spawn multiple ground vehicles, in a scheduled fashion. -- At Gudauta spawn multiple ground vehicles, in a scheduled fashion.
-- --
-- # Test cases: -- # Test cases:
-- --
-- 1. Observe that the ground vehicles are spawned at the position declared within the mission editor. -- 1. Observe that the ground vehicles are spawned at the position declared within the mission editor.
-- 2. The vehicles should spawn according the scheduler parameters. -- 2. The vehicles should spawn according the scheduler parameters.
-- 3. There should not be more than 5 groups spawned. -- 3. There should not be more than 5 groups spawned.
-- 4. Observe that the route that the vehicles follow is randomized starting from point 1 till point 3. -- 4. Observe that the route that the vehicles follow is randomized starting from point 1 till point 3.
-- Tests Gudauta -- Tests Gudauta
-- ------------- -- -------------
Spawn_Vehicle_1 = SPAWN:New( "Spawn Vehicle 1" ) Spawn_Vehicle_1 = SPAWN:New( "Spawn Vehicle 1" )
:InitLimit( 10, 10 ) :InitLimit( 10, 10 )
:InitRandomizeRoute( 1, 1, 200 ) -- Randomize route starting from point 1 till point 3, with a radius of 200 meters around each point. :InitRandomizeRoute( 1, 1, 200 ) -- Randomize route starting from point 1 till point 3, with a radius of 200 meters around each point.
:SpawnScheduled( 5, .5 ) :SpawnScheduled( 5, .5 )
@@ -1,29 +1,29 @@
-- Name: SPA-016 - Ground Ops - Randomize Zones -- Name: SPA-016 - Ground Ops - Randomize Zones
-- Author: FlightControl -- Author: FlightControl
-- Date Created: 10 Jan 2017 -- Date Created: 10 Jan 2017
-- --
-- # Situation: -- # Situation:
-- --
-- At Gudauta spawn multiple ground vehicles, in a scheduled fashion. -- At Gudauta spawn multiple ground vehicles, in a scheduled fashion.
-- --
-- # Test cases: -- # Test cases:
-- --
-- 1. Observe that the ground vehicles are spawned at the position declared within the mission editor. -- 1. Observe that the ground vehicles are spawned at the position declared within the mission editor.
-- 2. The vehicles should spawn according the scheduler parameters. -- 2. The vehicles should spawn according the scheduler parameters.
-- 3. There should not be more than 5 groups spawned. -- 3. There should not be more than 5 groups spawned.
-- 4. Observe that the route that the vehicles follow is randomized starting from point 1 till point 3. -- 4. Observe that the route that the vehicles follow is randomized starting from point 1 till point 3.
-- 5. Observe that the position where the units are spawned, is randomized according the zones. -- 5. Observe that the position where the units are spawned, is randomized according the zones.
-- Tests Gudauta -- Tests Gudauta
-- ------------- -- -------------
-- Create a zone table of the 2 zones. -- Create a zone table of the 2 zones.
ZoneTable = { ZONE:New( "Zone1" ), ZONE:New( "Zone2" ) } ZoneTable = { ZONE:New( "Zone1" ), ZONE:New( "Zone2" ) }
Spawn_Vehicle_1 = SPAWN:New( "Spawn Vehicle 1" ) Spawn_Vehicle_1 = SPAWN:New( "Spawn Vehicle 1" )
:InitLimit( 10, 10 ) :InitLimit( 10, 10 )
:InitRandomizeRoute( 1, 1, 200 ) :InitRandomizeRoute( 1, 1, 200 )
:InitRandomizeZones( ZoneTable ) :InitRandomizeZones( ZoneTable )
:SpawnScheduled( 5, .5 ) :SpawnScheduled( 5, .5 )
@@ -1,32 +1,32 @@
-- Name: SPA-017 - Ground Ops - Set AI inactive while spawning -- Name: SPA-017 - Ground Ops - Set AI inactive while spawning
-- Author: FlightControl -- Author: FlightControl
-- Date Created: 24 Jan 2017 -- Date Created: 24 Jan 2017
-- Checked in 15 dez 2020 by ZERO -- Checked in 15 dez 2020 by ZERO
-- --
-- # Situation: -- # Situation:
-- --
-- At Gudauta spawn multiple ground vehicles, in a scheduled fashion. -- At Gudauta spawn multiple ground vehicles, in a scheduled fashion.
-- But set the AI inactive when spawning. -- But set the AI inactive when spawning.
-- --
-- # Test cases: -- # Test cases:
-- --
-- 1. Observe that the ground vehicles are spawned at the position declared within the mission editor. -- 1. Observe that the ground vehicles are spawned at the position declared within the mission editor.
-- 2. The vehicles should spawn according the scheduler parameters. -- 2. The vehicles should spawn according the scheduler parameters.
-- 3. There should not be more than 10 groups spawned. -- 3. There should not be more than 10 groups spawned.
-- 4. Observe that the AI is inactivated, and thus, the vehicles aren't moving. -- 4. Observe that the AI is inactivated, and thus, the vehicles aren't moving.
-- 5. Observe that the position where the units are spawned, is randomized in the zones perimeters. -- 5. Observe that the position where the units are spawned, is randomized in the zones perimeters.
-- Tests Gudauta -- Tests Gudauta
-- ------------- -- -------------
-- Create a zone table of the 2 zones. -- Create a zone table of the 2 zones.
ZoneTable = { ZONE:New( "Zone1" ), ZONE:New( "Zone2" ) } ZoneTable = { ZONE:New( "Zone1" ), ZONE:New( "Zone2" ) }
Spawn_Vehicle_1 = SPAWN:New( "Spawn Vehicle 1" ) Spawn_Vehicle_1 = SPAWN:New( "Spawn Vehicle 1" )
:InitLimit( 10, 10 ) :InitLimit( 10, 10 )
:InitRandomizeRoute( 1, 1, 200 ) :InitRandomizeRoute( 1, 1, 200 )
:InitRandomizeZones( ZoneTable ) :InitRandomizeZones( ZoneTable )
:InitAIOnOff( false ) -- This will disable the AI. You can also use :InitAIOff(). Set AI On (for those groups with AI Off in the ME), with :InitAIOn(). :InitAIOnOff( false ) -- This will disable the AI. You can also use :InitAIOff(). Set AI On (for those groups with AI Off in the ME), with :InitAIOn().
:SpawnScheduled( 5, .5 ) :SpawnScheduled( 5, .5 )
@@ -1,34 +1,34 @@
--- ---
-- Name: SPA-018 - Ground Ops - Randomize Templates -- Name: SPA-018 - Ground Ops - Randomize Templates
-- Author: FlightControl -- Author: FlightControl
-- Date Created: 10 Jan 2017 -- Date Created: 10 Jan 2017
-- Checked in 15 dez 2020 by ZERO -- Checked in 15 dez 2020 by ZERO
-- --
-- # Situation: -- # Situation:
-- --
-- At Gudauta spawn multiple ground vehicles, in a scheduled fashion. -- At Gudauta spawn multiple ground vehicles, in a scheduled fashion.
-- --
-- # Test cases: -- # Test cases:
-- --
-- 1. Observe that the ground vehicles are spawned at the position declared within the mission editor. -- 1. Observe that the ground vehicles are spawned at the position declared within the mission editor.
-- 2. The vehicles should spawn according the scheduler parameters. -- 2. The vehicles should spawn according the scheduler parameters.
-- 3. There should not be more than 10 groups spawned. -- 3. There should not be more than 10 groups spawned.
-- 4. Observe that the route that the vehicles follow is randomized starting from point 1 till point 3. -- 4. Observe that the route that the vehicles follow is randomized starting from point 1 till point 3.
-- 5. Observe that the position where the units are spawned, is randomized according the zones. -- 5. Observe that the position where the units are spawned, is randomized according the zones.
-- 6. Observe that the ground vehicles are spawned with randomized templates. -- 6. Observe that the ground vehicles are spawned with randomized templates.
-- Tests Gudauta -- Tests Gudauta
-- ------------- -- -------------
-- Create a zone table of the 2 zones. -- Create a zone table of the 2 zones.
ZoneTable = { ZONE:New( "Zone1" ), ZONE:New( "Zone2" ) } ZoneTable = { ZONE:New( "Zone1" ), ZONE:New( "Zone2" ) }
TemplateTable = { "A", "B", "C" } TemplateTable = { "A", "B", "C" }
Spawn_Vehicle_1 = SPAWN:New( "Spawn Vehicle 1" ) Spawn_Vehicle_1 = SPAWN:New( "Spawn Vehicle 1" )
:InitLimit( 10, 10 ) :InitLimit( 10, 10 )
:InitRandomizeRoute( 1, 1, 200 ) :InitRandomizeRoute( 1, 1, 200 )
:InitRandomizeZones( ZoneTable ) :InitRandomizeZones( ZoneTable )
:InitRandomizeTemplate( TemplateTable ) :InitRandomizeTemplate( TemplateTable )
:SpawnScheduled( 5, .5 ) :SpawnScheduled( 5, .5 )
@@ -1,27 +1,27 @@
--- ---
-- Name: SPA-019 - Ground Ops - Randomize Templates with Waypoints -- Name: SPA-019 - Ground Ops - Randomize Templates with Waypoints
-- Author: FlightControl -- Author: FlightControl
-- Date Created: 24 Feb 2017 -- Date Created: 24 Feb 2017
-- --
-- # Situation: -- # Situation:
-- --
-- At Gudauta spawn multiple ground vehicles, in a scheduled fashion. -- At Gudauta spawn multiple ground vehicles, in a scheduled fashion.
-- --
-- # Test cases: -- # Test cases:
-- --
-- 1. Observe that the ground vehicles are spawned with randomized templates. -- 1. Observe that the ground vehicles are spawned with randomized templates.
-- 2. Observe that the ground vehicles are spread around the spawning area and are not stacked upon each other. -- 2. Observe that the ground vehicles are spread around the spawning area and are not stacked upon each other.
-- Tests Gudauta -- Tests Gudauta
-- ------------- -- -------------
-- Create a zone table of the 2 zones. -- Create a zone table of the 2 zones.
ZoneTable = { ZONE:New( "Zone1" ), ZONE:New( "Zone2" ) } ZoneTable = { ZONE:New( "Zone1" ), ZONE:New( "Zone2" ) }
TemplateTable = { "A", "B", "C" } TemplateTable = { "A", "B", "C" }
Spawn_Vehicle_1 = SPAWN:New( "Spawn Vehicle 1" ) Spawn_Vehicle_1 = SPAWN:New( "Spawn Vehicle 1" )
:InitLimit( 10, 10 ) :InitLimit( 10, 10 )
:InitRandomizeTemplate( TemplateTable ) :InitRandomizeTemplate( TemplateTable )
:SpawnScheduled( 5, .5 ) :SpawnScheduled( 5, .5 )
@@ -1,29 +1,29 @@
--- ---
-- Name: SPA-020 - Ground Ops - Randomize Templates in Random Zones without Waypoints -- Name: SPA-020 - Ground Ops - Randomize Templates in Random Zones without Waypoints
-- Author: FlightControl -- Author: FlightControl
-- Date Created: 24 Feb 2017 -- Date Created: 24 Feb 2017
-- --
-- # Situation: -- # Situation:
-- --
-- At Gudauta spawn multiple ground vehicles, in a scheduled fashion. -- At Gudauta spawn multiple ground vehicles, in a scheduled fashion.
-- --
-- # Test cases: -- # Test cases:
-- --
-- 1. Observe that the ground vehicles are spawned with randomized templates. -- 1. Observe that the ground vehicles are spawned with randomized templates.
-- 2. Observe that the ground vehicles are spread around the spawning area and are not stacked upon each other. -- 2. Observe that the ground vehicles are spread around the spawning area and are not stacked upon each other.
-- 3. Observe that the ground vehicles are spread over the random zones, and that the initial templates formations are kept. -- 3. Observe that the ground vehicles are spread over the random zones, and that the initial templates formations are kept.
-- Tests Gudauta -- Tests Gudauta
-- ------------- -- -------------
-- Create a zone table of the 2 zones. -- Create a zone table of the 2 zones.
ZoneTable = { ZONE:New( "Zone1" ), ZONE:New( "Zone2" ) } ZoneTable = { ZONE:New( "Zone1" ), ZONE:New( "Zone2" ) }
TemplateTable = { "A", "B", "C" } TemplateTable = { "A", "B", "C" }
Spawn_Vehicle_1 = SPAWN:New( "Spawn Vehicle 1" ) Spawn_Vehicle_1 = SPAWN:New( "Spawn Vehicle 1" )
:InitLimit( 100, 10 ) :InitLimit( 100, 10 )
:InitRandomizeTemplate( TemplateTable ) :InitRandomizeTemplate( TemplateTable )
:InitRandomizeZones( ZoneTable ) :InitRandomizeZones( ZoneTable )
:SpawnScheduled( 5, .5 ) :SpawnScheduled( 5, .5 )
@@ -1,9 +1,9 @@
SPA-017 - The Mission was not working. I have done it again! Now its working. SPA-017 - The Mission was not working. I have done it again! Now its working.
SPA-018 - Changed the code and the units into MAP. Checked and it is working. SPA-018 - Changed the code and the units into MAP. Checked and it is working.
SPA-019 - Note by ZERO (15/12/2020): the vehicles are spawned upon each other SPA-019 - Note by ZERO (15/12/2020): the vehicles are spawned upon each other
SPA-021 - Changed the code for spawn 20 units. it was not working like described SPA-021 - Changed the code for spawn 20 units. it was not working like described
SPA-022 - Changed the description of the mission SPA-022 - Changed the description of the mission
SPA-024 - Changed the description of the mission SPA-024 - Changed the description of the mission
SPA-100 - is not working. the function initclean() is not working SPA-100 - is not working. the function initclean() is not working
SPA-110 - Its working but its good to rework SPA-110 - Its working but its good to rework
SPA-140 - Doesnt work SPA-140 - Doesnt work
@@ -1,28 +1,28 @@
--- ---
-- Name: SPA-021 - Ground Ops - Scheduled Spawns Limited Keep Unit Names -- Name: SPA-021 - Ground Ops - Scheduled Spawns Limited Keep Unit Names
-- Author: FlightControl -- Author: FlightControl
-- Date Created: 14 Mar 2017 -- Date Created: 14 Mar 2017
-- Checked in 15 dez 2020 by ZERO -- Checked in 15 dez 2020 by ZERO
-- --
-- # Situation: -- # Situation:
-- --
-- At Gudauta spawn multiple ground vehicles, in a scheduled fashion. -- At Gudauta spawn multiple ground vehicles, in a scheduled fashion.
-- --
-- # Test cases: -- # Test cases:
-- --
-- 1. Observe that the ground vehicles are spawned at the position declared within the mission editor. -- 1. Observe that the ground vehicles are spawned at the position declared within the mission editor.
-- 2. The vehicles should spawn according the scheduler parameters. -- 2. The vehicles should spawn according the scheduler parameters.
-- 3. There should not be more than 5 groups spawned. (Number of units is 5 groups x 4 units in group = 20 that is a unit limits in :initLimit function in this implementation (:InitLimit( 20 , 10 ))) -- 3. There should not be more than 5 groups spawned. (Number of units is 5 groups x 4 units in group = 20 that is a unit limits in :initLimit function in this implementation (:InitLimit( 20 , 10 )))
-- 4. Observe the unit names, they should have the name as defined within the ME. -- 4. Observe the unit names, they should have the name as defined within the ME.
-- Tests Gudauta -- Tests Gudauta
-- ------------- -- -------------
Spawn_Vehicle_1 = SPAWN Spawn_Vehicle_1 = SPAWN
:New( "Spawn Vehicle 1" ) :New( "Spawn Vehicle 1" )
:InitKeepUnitNames() :InitKeepUnitNames()
:InitLimit( 20 , 10 ) :InitLimit( 20 , 10 )
:SpawnScheduled( 5, .5 ) :SpawnScheduled( 5, .5 )
@@ -1,25 +1,25 @@
-- Name: SPA-022 - Ground Ops - Scheduled Spawns Limited with long interval -- Name: SPA-022 - Ground Ops - Scheduled Spawns Limited with long interval
-- Author: FlightControl -- Author: FlightControl
-- Date Created: 18 Mar 2017 -- Date Created: 18 Mar 2017
-- Checked in 15 dez 2020 by ZERO -- Checked in 15 dez 2020 by ZERO
-- --
-- # Situation: -- # Situation:
-- --
-- At Gudauta spawn multiple ground vehicles, in a scheduled fashion. -- At Gudauta spawn multiple ground vehicles, in a scheduled fashion.
-- The vehicle should respawn when killed. -- The vehicle should respawn when killed.
-- --
-- # Test cases: -- # Test cases:
-- --
-- 1. Observe that the ground vehicles are spawned at the position declared within the mission editor. -- 1. Observe that the ground vehicles are spawned at the position declared within the mission editor.
-- 2. The vehicles should spawn according the scheduler parameters. -- 2. The vehicles should spawn according the scheduler parameters.
-- 3. When the vehicle spawned die, a new vehicle will be spawned -- 3. When the vehicle spawned die, a new vehicle will be spawned
-- Tests Gudauta -- Tests Gudauta
-- ------------- -- -------------
Spawn_Vehicle_1 = SPAWN:New( "Spawn Vehicle 1" ):InitLimit( 1, 0 ):SpawnScheduled( 30, .5 ) Spawn_Vehicle_1 = SPAWN:New( "Spawn Vehicle 1" ):InitLimit( 1, 0 ):SpawnScheduled( 30, .5 )
@@ -1,26 +1,26 @@
--- ---
-- Name: SPA-023 - Ground Ops - SpawnStart and SpawnStop -- Name: SPA-023 - Ground Ops - SpawnStart and SpawnStop
-- Author: FlightControl -- Author: FlightControl
-- Date Created: 10 Jan 2017 -- Date Created: 10 Jan 2017
-- --
-- # Situation: -- # Situation:
-- --
-- At Gudauta spawn multiple ground vehicles, in a scheduled fashion. -- At Gudauta spawn multiple ground vehicles, in a scheduled fashion.
-- The schedule is immediately stopped and started. -- The schedule is immediately stopped and started.
-- --
-- # Test cases: -- # Test cases:
-- --
-- 1. Observe that the ground vehicles are spawned at the position declared within the mission editor. -- 1. Observe that the ground vehicles are spawned at the position declared within the mission editor.
-- 2. The vehicles should spawn according the scheduler parameters. -- 2. The vehicles should spawn according the scheduler parameters.
-- Tests Gudauta -- Tests Gudauta
-- ------------- -- -------------
Spawn_Vehicle = SPAWN:New( "Spawn Vehicle 1" ):SpawnScheduled( 10, 0.5 ):SpawnScheduleStop() Spawn_Vehicle = SPAWN:New( "Spawn Vehicle 1" ):SpawnScheduled( 10, 0.5 ):SpawnScheduleStop()
Spawn_Vehicle:SpawnScheduleStart() Spawn_Vehicle:SpawnScheduleStart()
@@ -1,27 +1,27 @@
--- ---
-- Name: SPA-024 - Ground Ops - Arrays -- Name: SPA-024 - Ground Ops - Arrays
-- Author: FlightControl -- Author: FlightControl
-- Date Created: 19 Jul 2017 -- Date Created: 19 Jul 2017
-- --
-- # Situation: -- # Situation:
-- --
-- At Gudauta spawn multiple ground vehicles, in an array. -- At Gudauta spawn multiple ground vehicles, in an array.
-- --
-- # Test cases: -- # Test cases:
-- --
-- 1. Observe that the ground vehicles are spawned at the position declared within the mission editor. -- 1. Observe that the ground vehicles are spawned at the position declared within the mission editor.
-- 2. The vehicles should spawn according the array parameters. -- 2. The vehicles should spawn according the array parameters.
-- Tests Gudauta -- Tests Gudauta
-- ------------- -- -------------
Spawn_Vehicle = SPAWN Spawn_Vehicle = SPAWN
:New( "Spawn Vehicles" ) :New( "Spawn Vehicles" )
:InitLimit( 12, 60 ) :InitLimit( 12, 60 )
:InitArray( 90, 10, 10, 10 ) :InitArray( 90, 10, 10, 10 )
@@ -1,27 +1,27 @@
--- ---
-- Name: SPA-024 - Ground Ops - Arrays -- Name: SPA-024 - Ground Ops - Arrays
-- Author: FlightControl -- Author: FlightControl
-- Date Created: 19 Jul 2017 -- Date Created: 19 Jul 2017
-- --
-- # Situation: -- # Situation:
-- --
-- At Gudauta spawn multiple ground vehicles, in an array. -- At Gudauta spawn multiple ground vehicles, in an array.
-- --
-- # Test cases: -- # Test cases:
-- --
-- 1. Observe that the ground vehicles are spawned at the position declared within the mission editor. -- 1. Observe that the ground vehicles are spawned at the position declared within the mission editor.
-- 2. The vehicles should spawn according the array parameters. -- 2. The vehicles should spawn according the array parameters.
-- Tests Gudauta -- Tests Gudauta
-- ------------- -- -------------
Spawn_Vehicle = SPAWN Spawn_Vehicle = SPAWN
:New( "Spawn Vehicles" ) :New( "Spawn Vehicles" )
:InitLimit( 12, 60 ) :InitLimit( 12, 60 )
:InitArray( 90, 10, 10, 10 ) :InitArray( 90, 10, 10, 10 )
@@ -1,22 +1,22 @@
-- Name: SPA-025 - Ground Ops - Spawn Hidden -- Name: SPA-025 - Ground Ops - Spawn Hidden
-- Author: FlightControl -- Author: FlightControl
-- Date Created: 06 Sep 2017 -- Date Created: 06 Sep 2017
-- --
-- # Situation: -- # Situation:
-- --
-- At Gudauta spawn a ground vehicle, hidden -- At Gudauta spawn a ground vehicle, hidden
-- --
-- # Test cases: -- # Test cases:
-- --
-- 1. Observe that the ground vehicle is spawned and his hidden. -- 1. Observe that the ground vehicle is spawned and his hidden.
-- Tests Gudauta -- Tests Gudauta
-- ------------- -- -------------
-- Spawn a gound vehicle... -- Spawn a gound vehicle...
Spawn_Vehicle_1 = SPAWN:New( "Spawn Vehicle 1" ) Spawn_Vehicle_1 = SPAWN:New( "Spawn Vehicle 1" )
Spawn_Group_1 = Spawn_Vehicle_1:Spawn() Spawn_Group_1 = Spawn_Vehicle_1:Spawn()
@@ -1,26 +1,26 @@
-- Name: SPA-026 - Ground Ops - Spawn RandomizeTemplate Hidden -- Name: SPA-026 - Ground Ops - Spawn RandomizeTemplate Hidden
-- Author: FlightControl -- Author: FlightControl
-- Date Created: 06 Sep 2017 -- Date Created: 06 Sep 2017
-- Checked in 15 dez 2020 by ZERO -- Checked in 15 dez 2020 by ZERO
-- --
-- # Situation: -- # Situation:
-- --
-- At Gudauta spawn a ground vehicle, hidden, based on a randomized template. -- At Gudauta spawn a ground vehicle, hidden, based on a randomized template.
-- --
-- # Test cases: -- # Test cases:
-- --
-- 1. Observe that a random ground vehicle is spawned and his hidden. -- 1. Observe that a random ground vehicle is spawned and his hidden.
-- 2. Observe that templates are hidden on MAP on Mission Editor -- 2. Observe that templates are hidden on MAP on Mission Editor
-- Tests Gudauta -- Tests Gudauta
-- ------------- -- -------------
-- Spawn a gound vehicle... -- Spawn a gound vehicle...
Templates = { "A", "B" } Templates = { "A", "B" }
Spawn_Vehicle_1 = SPAWN:New( "vehicle" ) Spawn_Vehicle_1 = SPAWN:New( "vehicle" )
Spawn_Vehicle_1:InitRandomizeTemplate( Templates ) Spawn_Vehicle_1:InitRandomizeTemplate( Templates )
Spawn_Group_1 = Spawn_Vehicle_1:Spawn() Spawn_Group_1 = Spawn_Vehicle_1:Spawn()
@@ -1,25 +1,25 @@
-- Name: SPA-027 - Ground Ops - Respawning After Destroy -- Name: SPA-027 - Ground Ops - Respawning After Destroy
-- Author: FlightControl -- Author: FlightControl
-- Date Created: 10 Dec 2017 -- Date Created: 10 Dec 2017
-- --
-- At Gudauta spawns ground vehicle, in a scheduled fashion. -- At Gudauta spawns ground vehicle, in a scheduled fashion.
-- There can only be a maximum of 2 grond vehicles alive. -- There can only be a maximum of 2 grond vehicles alive.
-- When a ground vehicle is destroyed, a new one needs to be spawned at a different location in the zone. -- When a ground vehicle is destroyed, a new one needs to be spawned at a different location in the zone.
-- Until that one is also destroyed. -- Until that one is also destroyed.
-- --
-- Red is attacking the spawned blue vehicles. -- Red is attacking the spawned blue vehicles.
-- Once blue is destroyed, a new blue needs to spawn. -- Once blue is destroyed, a new blue needs to spawn.
-- Until all 10 blue vehicles are spawned. -- Until all 10 blue vehicles are spawned.
-- The position of blue is randomized in the zone. -- The position of blue is randomized in the zone.
-- Blue has ROE hold weapons. -- Blue has ROE hold weapons.
-- --
BlueVehicleSpawn = SPAWN BlueVehicleSpawn = SPAWN
:New( "Tank" ) :New( "Tank" )
:InitLimit( 2, 10 ) :InitLimit( 2, 10 )
:InitRandomizePosition( true, 200, 50 ) :InitRandomizePosition( true, 200, 50 )
:SpawnScheduled( 5, .5 ) :SpawnScheduled( 5, .5 )
@@ -1,8 +1,8 @@
-- Tests Kutaisi -- Tests Kutaisi
-- ------------- -- -------------
-- Tests the CleanUp functionality. -- Tests the CleanUp functionality.
-- Limited spawning of groups, scheduled every 10 seconds, who are engaging into combat. Some helicopters may crash land on the ground. -- Limited spawning of groups, scheduled every 10 seconds, who are engaging into combat. Some helicopters may crash land on the ground.
-- Observe when helicopters land but are not dead and are out of the danger zone, that they get removed after a while (+/- 180 seconds) and ReSpawn. -- Observe when helicopters land but are not dead and are out of the danger zone, that they get removed after a while (+/- 180 seconds) and ReSpawn.
Spawn_Helicopter_Scheduled_CleanUp = SPAWN:New( "Spawn Helicopter Scheduled CleanUp" ):InitLimit( 3, 100 ):InitRandomizeRoute( 1, 1, 1000 ):InitCleanUp( 60 ):SpawnScheduled( 10, 0 ) Spawn_Helicopter_Scheduled_CleanUp = SPAWN:New( "Spawn Helicopter Scheduled CleanUp" ):InitLimit( 3, 100 ):InitRandomizeRoute( 1, 1, 1000 ):InitCleanUp( 60 ):SpawnScheduled( 10, 0 )
Spawn_Vehicle_Scheduled_CleanUp = SPAWN:New( "Spawn Vehicle Scheduled CleanUp" ):InitLimit( 3, 100 ):InitRandomizeRoute( 1, 1, 1000 ):SpawnScheduled( 10, 0 ) Spawn_Vehicle_Scheduled_CleanUp = SPAWN:New( "Spawn Vehicle Scheduled CleanUp" ):InitLimit( 3, 100 ):InitRandomizeRoute( 1, 1, 1000 ):SpawnScheduled( 10, 0 )
@@ -1,17 +1,17 @@
--- ---
-- Tests Gudauta -- Tests Gudauta
-- ------------- -- -------------
-- Limited scheduled spawning of groups... -- Limited scheduled spawning of groups...
Spawn_Plane_Limited_Scheduled = SPAWN:New( "Spawn Plane Limited Scheduled" ):InitLimit( 4, 20 ):SpawnScheduled( 30, 0 ) Spawn_Plane_Limited_Scheduled = SPAWN:New( "Spawn Plane Limited Scheduled" ):InitLimit( 4, 20 ):SpawnScheduled( 30, 0 )
Spawn_Helicopter_Limited_Scheduled = SPAWN:New( "Spawn Helicopter Limited Scheduled" ):InitLimit( 4, 20 ):SpawnScheduled( 30, 0 ) Spawn_Helicopter_Limited_Scheduled = SPAWN:New( "Spawn Helicopter Limited Scheduled" ):InitLimit( 4, 20 ):SpawnScheduled( 30, 0 )
Spawn_Ground_Limited_Scheduled = SPAWN:New( "Spawn Vehicle Limited Scheduled" ):InitLimit( 4, 20 ):SpawnScheduled( 90, 0 ) Spawn_Ground_Limited_Scheduled = SPAWN:New( "Spawn Vehicle Limited Scheduled" ):InitLimit( 4, 20 ):SpawnScheduled( 90, 0 )
--- ---
-- Tests Sukhumi -- Tests Sukhumi
-- ------------- -- -------------
-- Limited scheduled spawning of groups with destruction... -- Limited scheduled spawning of groups with destruction...
Spawn_Plane_Limited_Scheduled_RandomizeRoute = SPAWN:New( "Spawn Plane Limited Scheduled Destroy" ):InitLimit( 4, 20 ):SpawnScheduled( 10, 0 ) Spawn_Plane_Limited_Scheduled_RandomizeRoute = SPAWN:New( "Spawn Plane Limited Scheduled Destroy" ):InitLimit( 4, 20 ):SpawnScheduled( 10, 0 )
Spawn_Helicopter_Limited_Scheduled_RandomizeRoute = SPAWN:New( "Spawn Helicopter Limited Scheduled Destroy" ):InitLimit( 4, 20 ):SpawnScheduled( 10, 0 ) Spawn_Helicopter_Limited_Scheduled_RandomizeRoute = SPAWN:New( "Spawn Helicopter Limited Scheduled Destroy" ):InitLimit( 4, 20 ):SpawnScheduled( 10, 0 )
Spawn_Vehicle_Limited_Scheduled_RandomizeRoute = SPAWN:New( "Spawn Vehicle Limited Scheduled Destroy" ):InitLimit( 4, 20 ):SpawnScheduled( 10, 0 ) Spawn_Vehicle_Limited_Scheduled_RandomizeRoute = SPAWN:New( "Spawn Vehicle Limited Scheduled Destroy" ):InitLimit( 4, 20 ):SpawnScheduled( 10, 0 )
@@ -1,35 +1,35 @@
--- ---
-- Name: SPA-120 - Air Ops - Scheduled Spawns with Repeat on Landing with Limit -- Name: SPA-120 - Air Ops - Scheduled Spawns with Repeat on Landing with Limit
-- Author: FlightControl -- Author: FlightControl
-- Date Created: 05 Feb 2017 -- Date Created: 05 Feb 2017
-- --
-- # Situation: -- # Situation:
-- --
-- One airplane and one helicopter will be spawned. -- One airplane and one helicopter will be spawned.
-- Only one airplane and one helicopter can be alive at the same time. -- Only one airplane and one helicopter can be alive at the same time.
-- Upon landing, the airplane and helicopter will respawn at Kutaisi. -- Upon landing, the airplane and helicopter will respawn at Kutaisi.
-- --
-- # Test cases: -- # Test cases:
-- --
-- 1. Observe the spawning of the airplane and helicopter -- 1. Observe the spawning of the airplane and helicopter
-- 2. There should not be more airplanes alive than there are set by InitLimit. -- 2. There should not be more airplanes alive than there are set by InitLimit.
-- 3. Upon landing, the planes should respawn. -- 3. Upon landing, the planes should respawn.
-- 5. The plane should respawn itself when the air unit has parked at the ramp or has landed. -- 5. The plane should respawn itself when the air unit has parked at the ramp or has landed.
do do
-- Declare SPAWN objects -- Declare SPAWN objects
Spawn_Plane = SPAWN:New("Plane"):InitLimit( 2, 0 ) Spawn_Plane = SPAWN:New("Plane"):InitLimit( 2, 0 )
-- Choose repeat functionality -- Choose repeat functionality
-- Repeat on ... (when landed on the airport) -- Repeat on ... (when landed on the airport)
Spawn_Plane:InitRepeatOnEngineShutDown() Spawn_Plane:InitRepeatOnEngineShutDown()
-- Now SPAWN the GROUPs -- Now SPAWN the GROUPs
Spawn_Plane:SpawnScheduled(30,0) Spawn_Plane:SpawnScheduled(30,0)
-- Now run the mission and observe the behaviour. -- Now run the mission and observe the behaviour.
end end
@@ -1,41 +1,41 @@
--- ---
-- MOOSE SPAWN repeat test scenario -- MOOSE SPAWN repeat test scenario
-- ------------------------------- -- -------------------------------
-- There are 8 GROUPs Spawned. -- There are 8 GROUPs Spawned.
-- They fly around Kutaisi and will land. -- They fly around Kutaisi and will land.
-- Upon landing: -- Upon landing:
-- 1. The KA-50 and the C-101EB should respawn itself directly when landed. -- 1. The KA-50 and the C-101EB should respawn itself directly when landed.
-- 2. the MI-8MTV2 and the A-10C should respawn itself when the air unit has parked at the ramp. -- 2. the MI-8MTV2 and the A-10C should respawn itself when the air unit has parked at the ramp.
-- --
do do
-- Declare SPAWN objects -- Declare SPAWN objects
local Spawn_KA_50 = SPAWN:New("KA-50") local Spawn_KA_50 = SPAWN:New("KA-50")
local Spawn_MI_8MTV2 = SPAWN:New("MI-8MTV2") local Spawn_MI_8MTV2 = SPAWN:New("MI-8MTV2")
local Spawn_C_101EB = SPAWN:New("C-101EB") local Spawn_C_101EB = SPAWN:New("C-101EB")
local Spawn_A_10C = SPAWN:New("A-10C") local Spawn_A_10C = SPAWN:New("A-10C")
-- Choose repeat functionality -- Choose repeat functionality
-- Repeat on landing -- Repeat on landing
Spawn_KA_50:InitRepeatOnLanding() Spawn_KA_50:InitRepeatOnLanding()
Spawn_C_101EB:InitRepeatOnLanding() Spawn_C_101EB:InitRepeatOnLanding()
-- Repeat on enging shutdown (when landed on the airport) -- Repeat on enging shutdown (when landed on the airport)
Spawn_MI_8MTV2:InitRepeatOnEngineShutDown() Spawn_MI_8MTV2:InitRepeatOnEngineShutDown()
Spawn_A_10C:InitRepeatOnEngineShutDown() Spawn_A_10C:InitRepeatOnEngineShutDown()
-- Now SPAWN the GROUPs -- Now SPAWN the GROUPs
Spawn_KA_50:Spawn() Spawn_KA_50:Spawn()
Spawn_C_101EB:Spawn() Spawn_C_101EB:Spawn()
Spawn_MI_8MTV2:Spawn() Spawn_MI_8MTV2:Spawn()
Spawn_A_10C:Spawn() Spawn_A_10C:Spawn()
Spawn_KA_50:Spawn() Spawn_KA_50:Spawn()
Spawn_C_101EB:Spawn() Spawn_C_101EB:Spawn()
Spawn_MI_8MTV2:Spawn() Spawn_MI_8MTV2:Spawn()
Spawn_A_10C:Spawn() Spawn_A_10C:Spawn()
-- Now run the mission and observe the behaviour. -- Now run the mission and observe the behaviour.
end end
@@ -1,51 +1,51 @@
--- ---
-- Name: SPA-121 - Air Ops - Scheduled Spawns with Repeat on Landing with Limit -- Name: SPA-121 - Air Ops - Scheduled Spawns with Repeat on Landing with Limit
-- Author: FlightControl -- Author: FlightControl
-- Date Created: 05 Feb 2017 -- Date Created: 05 Feb 2017
-- --
-- # Situation: -- # Situation:
-- --
-- Multiple airplanes will be spawned at a scheduled interval. -- Multiple airplanes will be spawned at a scheduled interval.
-- There is a limit on how many airplanes can be alive at the same time. -- There is a limit on how many airplanes can be alive at the same time.
-- Upon landing, the airplanes will respawn at Kutaisi. -- Upon landing, the airplanes will respawn at Kutaisi.
-- --
-- # Test cases: -- # Test cases:
-- --
-- 1. Observe the spawning of the airplanes -- 1. Observe the spawning of the airplanes
-- 2. There should not be more airplanes alive than there are set by InitLimit. -- 2. There should not be more airplanes alive than there are set by InitLimit.
-- 3. Upon landing, the planes should respawn. -- 3. Upon landing, the planes should respawn.
-- 4. The KA-50 and the C-101EB should respawn itself directly when landed. -- 4. The KA-50 and the C-101EB should respawn itself directly when landed.
-- 5. the MI-8MTV2 and the A-10C should respawn itself when the air unit has parked at the ramp. -- 5. the MI-8MTV2 and the A-10C should respawn itself when the air unit has parked at the ramp.
do do
-- Declare SPAWN objects -- Declare SPAWN objects
Spawn_KA_50 = SPAWN:New("KA-50"):InitLimit( 2, 10 ) Spawn_KA_50 = SPAWN:New("KA-50"):InitLimit( 2, 10 )
Spawn_MI_8MTV2 = SPAWN:New("MI-8MTV2"):InitLimit( 2, 10 ) Spawn_MI_8MTV2 = SPAWN:New("MI-8MTV2"):InitLimit( 2, 10 )
Spawn_C_101EB = SPAWN:New("C-101EB"):InitLimit( 2, 10 ) Spawn_C_101EB = SPAWN:New("C-101EB"):InitLimit( 2, 10 )
Spawn_A_10C = SPAWN:New("A-10C") Spawn_A_10C = SPAWN:New("A-10C")
:InitLimit( 2, 10 ) :InitLimit( 2, 10 )
-- Choose repeat functionality -- Choose repeat functionality
-- Repeat on landing -- Repeat on landing
Spawn_KA_50:InitRepeatOnLanding() Spawn_KA_50:InitRepeatOnLanding()
Spawn_KA_50:InitDelayOff() Spawn_KA_50:InitDelayOff()
Spawn_C_101EB:InitRepeatOnLanding() Spawn_C_101EB:InitRepeatOnLanding()
Spawn_C_101EB:InitDelayOff() Spawn_C_101EB:InitDelayOff()
-- Repeat on enging shutdown (when landed on the airport) -- Repeat on enging shutdown (when landed on the airport)
Spawn_MI_8MTV2:InitRepeatOnEngineShutDown() Spawn_MI_8MTV2:InitRepeatOnEngineShutDown()
Spawn_A_10C:InitRepeatOnEngineShutDown() Spawn_A_10C:InitRepeatOnEngineShutDown()
-- Now SPAWN the GROUPs -- Now SPAWN the GROUPs
Spawn_KA_50:SpawnScheduled(180,0) Spawn_KA_50:SpawnScheduled(180,0)
Spawn_C_101EB:SpawnScheduled(180,0) Spawn_C_101EB:SpawnScheduled(180,0)
Spawn_MI_8MTV2:SpawnScheduled(180,0) Spawn_MI_8MTV2:SpawnScheduled(180,0)
Spawn_A_10C:SpawnScheduled(180,0) Spawn_A_10C:SpawnScheduled(180,0)
-- Now run the mission and observe the behaviour. -- Now run the mission and observe the behaviour.
end end
@@ -1,47 +1,47 @@
--- ---
-- Name: SPA-122 - Air Ops - OnLand test for Scheduled Spawns -- Name: SPA-122 - Air Ops - OnLand test for Scheduled Spawns
-- Author: FlightControl -- Author: FlightControl
-- Date Created: 21 Mar 2017 -- Date Created: 21 Mar 2017
-- --
-- # Situation: -- # Situation:
-- --
-- An airplane is spawned at a scheduled interval. -- An airplane is spawned at a scheduled interval.
-- There is a limit on how many airplanes can be alive at the same time. -- There is a limit on how many airplanes can be alive at the same time.
-- Upon landing, the airplane will respawn in the air. -- Upon landing, the airplane will respawn in the air.
-- --
-- # Test cases: -- # Test cases:
-- --
-- 1. Observe the spawning of the airplanes -- 1. Observe the spawning of the airplanes
-- 2. There should not be more airplanes alive than there are set by InitLimit. -- 2. There should not be more airplanes alive than there are set by InitLimit.
-- 3. Upon landing, the planes should respawn. -- 3. Upon landing, the planes should respawn.
-- 4. The KA-50 and the C-101EB should respawn itself directly when landed. -- 4. The KA-50 and the C-101EB should respawn itself directly when landed.
-- 5. the MI-8MTV2 and the A-10C should respawn itself when the air unit has parked at the ramp. -- 5. the MI-8MTV2 and the A-10C should respawn itself when the air unit has parked at the ramp.
do do
-- Declare SPAWN objects -- Declare SPAWN objects
Spawn_KA_50 = SPAWN:New("KA-50"):InitLimit( 1, 0 ) Spawn_KA_50 = SPAWN:New("KA-50"):InitLimit( 1, 0 )
Spawn_MI_8MTV2 = SPAWN:New("MI-8MTV2"):InitLimit( 1, 0 ) Spawn_MI_8MTV2 = SPAWN:New("MI-8MTV2"):InitLimit( 1, 0 )
Spawn_C_101EB = SPAWN:New("C-101EB"):InitLimit( 1, 0 ) Spawn_C_101EB = SPAWN:New("C-101EB"):InitLimit( 1, 0 )
Spawn_A_10C = SPAWN:New("A-10C"):InitLimit( 1, 0 ) Spawn_A_10C = SPAWN:New("A-10C"):InitLimit( 1, 0 )
-- Choose repeat functionality -- Choose repeat functionality
-- Repeat on landing -- Repeat on landing
Spawn_KA_50:InitRepeatOnLanding() Spawn_KA_50:InitRepeatOnLanding()
Spawn_C_101EB:InitRepeatOnLanding() Spawn_C_101EB:InitRepeatOnLanding()
-- Repeat on enging shutdown (when landed on the airport) -- Repeat on enging shutdown (when landed on the airport)
Spawn_MI_8MTV2:InitRepeatOnEngineShutDown() Spawn_MI_8MTV2:InitRepeatOnEngineShutDown()
Spawn_A_10C:InitRepeatOnEngineShutDown() Spawn_A_10C:InitRepeatOnEngineShutDown()
-- Now SPAWN the GROUPs -- Now SPAWN the GROUPs
Spawn_KA_50:SpawnScheduled(30,0) Spawn_KA_50:SpawnScheduled(30,0)
Spawn_C_101EB:SpawnScheduled(30,0) Spawn_C_101EB:SpawnScheduled(30,0)
Spawn_MI_8MTV2:SpawnScheduled(30,0) Spawn_MI_8MTV2:SpawnScheduled(30,0)
Spawn_A_10C:SpawnScheduled(30,0) Spawn_A_10C:SpawnScheduled(30,0)
-- Now run the mission and observe the behaviour. -- Now run the mission and observe the behaviour.
end end
@@ -1,29 +1,29 @@
--- ---
-- Name: SPA-123 - Air Ops - Repeat on Landing and InitCleanUp -- Name: SPA-123 - Air Ops - Repeat on Landing and InitCleanUp
-- Author: FlightControl -- Author: FlightControl
-- Date Created: 15 Sep 2018 -- Date Created: 15 Sep 2018
-- Checked in 15 dez 2020 by ZERO -- Checked in 15 dez 2020 by ZERO
-- --
-- # Situation: -- # Situation:
-- --
-- Helicpters spawn and are lightly shot until the crash land, but don't really destroy. -- Helicpters spawn and are lightly shot until the crash land, but don't really destroy.
-- The should be respawned after a while. -- The should be respawned after a while.
-- No performance overhead should be noticed. -- No performance overhead should be noticed.
do do
-- Declare SPAWN objects -- Declare SPAWN objects
Spawn_KA_50 = SPAWN:New("KA-50") Spawn_KA_50 = SPAWN:New("KA-50")
:InitLimit( 2, 0 ) :InitLimit( 2, 0 )
-- Choose repeat functionality -- Choose repeat functionality
-- Repeat on landing -- Repeat on landing
Spawn_KA_50:InitRepeatOnLanding() Spawn_KA_50:InitRepeatOnLanding()
Spawn_KA_50:InitDelayOff() Spawn_KA_50:InitDelayOff()
Spawn_KA_50:InitCleanUp( 300 ) Spawn_KA_50:InitCleanUp( 300 )
Spawn_KA_50:SpawnScheduled( 180, 0.2 ) Spawn_KA_50:SpawnScheduled( 180, 0.2 )
-- Now run the mission and observe the behaviour. -- Now run the mission and observe the behaviour.
end end
@@ -1,52 +1,52 @@
---------------------------------------------------------------------- ----------------------------------------------------------------------
--SPA-124 - Air Ops - Scheduled Spawns with OnSpawnGroup() Escort Task --SPA-124 - Air Ops - Scheduled Spawns with OnSpawnGroup() Escort Task
---------------------------------------------------------------------- ----------------------------------------------------------------------
--////////////////////////////////// --//////////////////////////////////
--////////////Tankers and awacs v1 --////////////Tankers and awacs v1
--////////////////////////////////// --//////////////////////////////////
--////////// By Targs35 ///////////// --////////// By Targs35 /////////////
--//////////////// from 62nd Air Wing, Brisbane server.. --//////////////// from 62nd Air Wing, Brisbane server..
--/////////////////////////////////// --///////////////////////////////////
------- With thanks to the guys at MOOSE and in particular Pikes, Nolove, Delta99 and Wingthor ------- With thanks to the guys at MOOSE and in particular Pikes, Nolove, Delta99 and Wingthor
-- Funky Frank is the man.. -- Funky Frank is the man..
-----//////////////////////////////// -----////////////////////////////////
--/////////// Spawn Tanker and Escorts /// --/////////// Spawn Tanker and Escorts ///
do do
local PointVec1 = POINT_VEC3:New( -100, 20, 80 ) -- This is a Vec3 class - defines the position of the escorts relative to the escorted group local PointVec1 = POINT_VEC3:New( -100, 20, 80 ) -- This is a Vec3 class - defines the position of the escorts relative to the escorted group
local PointVec2 = POINT_VEC3:New( -100, 20, 150 ) -- This is a Vec3 class - defines the position of the escorts relative to the escorted group local PointVec2 = POINT_VEC3:New( -100, 20, 150 ) -- This is a Vec3 class - defines the position of the escorts relative to the escorted group
--Create Spawn Groups, use the OnSpawnGroup() function to spawn two escorts and task them --Create Spawn Groups, use the OnSpawnGroup() function to spawn two escorts and task them
local Tanker_Texaco = SPAWN local Tanker_Texaco = SPAWN
:New("Tanker_Texaco_Droge") :New("Tanker_Texaco_Droge")
:InitLimit( 1, 2 ) -- group with one unit, spawn 1 *alive* units max :InitLimit( 1, 2 ) -- group with one unit, spawn 1 *alive* units max
:InitCleanUp( 240 ) :InitCleanUp( 240 )
:OnSpawnGroup(function (tanker) -- tanker contains the GROUP object when the tanker spawns :OnSpawnGroup(function (tanker) -- tanker contains the GROUP object when the tanker spawns
local Escort_Texaco_1 = SPAWN local Escort_Texaco_1 = SPAWN
:New("Escort_Texaco_F14 001") :New("Escort_Texaco_F14 001")
:InitLimit( 1, 2 ) :InitLimit( 1, 2 )
:InitCleanUp( 240 ) :InitCleanUp( 240 )
:OnSpawnGroup(function (spawndgroup) -- spawndgrp contains the GROUP object when the escort spawns :OnSpawnGroup(function (spawndgroup) -- spawndgrp contains the GROUP object when the escort spawns
local FollowDCSTask1 = spawndgroup:TaskFollow( tanker, PointVec1 ) -- create task local FollowDCSTask1 = spawndgroup:TaskFollow( tanker, PointVec1 ) -- create task
spawndgroup:SetTask( FollowDCSTask1, 1 ) -- push task on the GROUP spawndgroup:SetTask( FollowDCSTask1, 1 ) -- push task on the GROUP
end end
) )
:SpawnScheduled( 60, 0.5 ) :SpawnScheduled( 60, 0.5 )
local Escort_Texaco_2 = SPAWN local Escort_Texaco_2 = SPAWN
:New("Escort_Texaco_F14 002") :New("Escort_Texaco_F14 002")
:InitLimit( 1, 2 ) :InitLimit( 1, 2 )
:InitCleanUp( 240 ) :InitCleanUp( 240 )
:OnSpawnGroup(function (spawndgroup) -- spawndgrp contains the GROUP object when the escort spawns :OnSpawnGroup(function (spawndgroup) -- spawndgrp contains the GROUP object when the escort spawns
local FollowDCSTask2 = spawndgroup:TaskFollow( tanker, PointVec2 ) local FollowDCSTask2 = spawndgroup:TaskFollow( tanker, PointVec2 )
spawndgroup:SetTask( FollowDCSTask2, 1 ) spawndgroup:SetTask( FollowDCSTask2, 1 )
end end
) )
:SpawnScheduled( 60, 0.5 ) :SpawnScheduled( 60, 0.5 )
end end
) )
:SpawnScheduled( 60, 0.5 ) :SpawnScheduled( 60, 0.5 )
end end

Some files were not shown because too many files have changed in this diff Show More