Updated Moose.lua

This commit is contained in:
funkyfranky
2022-10-14 16:49:26 +00:00
parent 492c97dbae
commit 2c98595cb2
125 changed files with 6060 additions and 387 deletions

View File

@@ -0,0 +1,27 @@
---
-- Name: SPA-024 - Ground Ops - Arrays
-- Author: FlightControl
-- Date Created: 19 Jul 2017
--
-- # Situation:
--
-- At Gudauta spawn multiple ground vehicles, in an array.
--
-- # Test cases:
--
-- 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.
-- Tests Gudauta
-- -------------
Spawn_Vehicle = SPAWN
:New( "Spawn Vehicles" )
:InitLimit( 12, 60 )
:InitArray( 90, 10, 10, 10 )

View File

@@ -0,0 +1,8 @@
-- Tests Kutaisi
-- -------------
-- 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.
-- 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_Vehicle_Scheduled_CleanUp = SPAWN:New( "Spawn Vehicle Scheduled CleanUp" ):InitLimit( 3, 100 ):InitRandomizeRoute( 1, 1, 1000 ):SpawnScheduled( 10, 0 )

View File

@@ -0,0 +1,52 @@
----------------------------------------------------------------------
--SPA-124 - Air Ops - Scheduled Spawns with OnSpawnGroup() Escort Task
----------------------------------------------------------------------
--//////////////////////////////////
--////////////Tankers and awacs v1
--//////////////////////////////////
--////////// By Targs35 /////////////
--//////////////// from 62nd Air Wing, Brisbane server..
--///////////////////////////////////
------- With thanks to the guys at MOOSE and in particular Pikes, Nolove, Delta99 and Wingthor
-- Funky Frank is the man..
-----////////////////////////////////
--/////////// Spawn Tanker and Escorts ///
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 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
local Tanker_Texaco = SPAWN
:New("Tanker_Texaco_Droge")
:InitLimit( 1, 2 ) -- group with one unit, spawn 1 *alive* units max
:InitCleanUp( 240 )
:OnSpawnGroup(function (tanker) -- tanker contains the GROUP object when the tanker spawns
local Escort_Texaco_1 = SPAWN
:New("Escort_Texaco_F14 001")
:InitLimit( 1, 2 )
:InitCleanUp( 240 )
:OnSpawnGroup(function (spawndgroup) -- spawndgrp contains the GROUP object when the escort spawns
local FollowDCSTask1 = spawndgroup:TaskFollow( tanker, PointVec1 ) -- create task
spawndgroup:SetTask( FollowDCSTask1, 1 ) -- push task on the GROUP
end
)
:SpawnScheduled( 60, 0.5 )
local Escort_Texaco_2 = SPAWN
:New("Escort_Texaco_F14 002")
:InitLimit( 1, 2 )
:InitCleanUp( 240 )
:OnSpawnGroup(function (spawndgroup) -- spawndgrp contains the GROUP object when the escort spawns
local FollowDCSTask2 = spawndgroup:TaskFollow( tanker, PointVec2 )
spawndgroup:SetTask( FollowDCSTask2, 1 )
end
)
:SpawnScheduled( 60, 0.5 )
end
)
:SpawnScheduled( 60, 0.5 )
end

View File

@@ -1,11 +1,11 @@
-- Name: SPA-131 - Air Ops - SpawnAtAirbase
-- Author: FlightControl
-- Date Created: 14 Sep 2017
--
Spawn_Plane = SPAWN:New( "Plane" )
Spawn_Plane:SpawnAtAirbase( AIRBASE:FindByName( AIRBASE.Nevada.Groom_Lake_AFB ), SPAWN.Takeoff.Cold )
Spawn_Plane:SpawnAtAirbase( AIRBASE:FindByName( AIRBASE.Nevada.Groom_Lake_AFB ), SPAWN.Takeoff.Hot )
Spawn_Plane:SpawnAtAirbase( AIRBASE:FindByName( AIRBASE.Nevada.Groom_Lake_AFB ), SPAWN.Takeoff.Runway )
-- Name: SPA-131 - Air Ops - SpawnAtAirbase
-- Author: FlightControl
-- Date Created: 14 Sep 2017
--
Spawn_Plane = SPAWN:New( "Plane" )
Spawn_Plane:SpawnAtAirbase( AIRBASE:FindByName( AIRBASE.Nevada.Groom_Lake_AFB ), SPAWN.Takeoff.Cold )
Spawn_Plane:SpawnAtAirbase( AIRBASE:FindByName( AIRBASE.Nevada.Groom_Lake_AFB ), SPAWN.Takeoff.Hot )
Spawn_Plane:SpawnAtAirbase( AIRBASE:FindByName( AIRBASE.Nevada.Groom_Lake_AFB ), SPAWN.Takeoff.Runway )

View File

@@ -0,0 +1,73 @@
---
-- Name: SPA-350 - Spawn at Vec3 position RandomzePosition
-- Author: FlightControl
-- Date Created: 14 Mar 2017
--
-- # Situation:
--
-- Ground troops, Airplanes, Helicopters and Ships are spawning from Vec3 points.
-- The API InitRandomizePosition is tested here, ensure that groups are replaced within a 900 to 1000 zone band at random positions.
--
-- # Test cases:
--
-- 1. Observe the random positioning of the groups. There should be no scattering of units.
--
local Iterations = 10
local Iteration = 1
GroundZones = { "GroundZone1", "GroundZone2", "GroundZone3" }
GroundRandomizeZones = { "GroundRandomizeZone1", "GroundRandomizeZone2", "GroundRandomizeZone3" }
AirplaneZones = { "AirplaneZone1", "AirplaneZone2", "AirplaneZone3" }
HelicopterZones = { "HelicopterZone1", "HelicopterZone2", "HelicopterZone3" }
ShipZones = { "ShipZone1", "ShipZone2", "ShipZone3" }
HeightLimit = 500
SpawnGrounds = SPAWN:New("Ground"):InitLimit( 20, 10 ):InitRandomizePosition( true , 1000, 900 )
SpawnRandomizeGrounds = SPAWN:New("GroundRandomize"):InitLimit( 20, 10 ):InitRandomizePosition( true , 1000, 900 )
SpawnAirplanes = SPAWN:New("Airplane"):InitLimit( 20, 10 ):InitRandomizePosition( true , 1000, 900 )
SpawnHelicopters = SPAWN:New("Helicopter"):InitLimit( 20, 10 ):InitRandomizePosition( true , 1000, 900 )
SpawnShips = SPAWN:New("Ship"):InitLimit( 20, 10 ):InitRandomizePosition( true , 1000, 900 )
--- Spawns these groups slowly.
SCHEDULER:New( nil,
function( Interation, Iterations )
do
-- Spawn Ground
local ZoneName = GroundZones[ math.random( 1, 3 ) ]
local SpawnVec3 = POINT_VEC3:NewFromVec3( ZONE:New( ZoneName ):GetVec3() )
SpawnGrounds:SpawnFromVec3( SpawnVec3:GetVec3() )
end
do
-- Spawn Ground Randomize
local ZoneName = GroundRandomizeZones[ math.random( 1, 3 ) ]
local SpawnVec3 = POINT_VEC3:NewFromVec3( ZONE:New( ZoneName ):GetVec3() )
SpawnRandomizeGrounds:SpawnFromVec3( SpawnVec3:GetVec3() )
end
do
-- Spawn Airplanes
local ZoneName = AirplaneZones[ math.random( 1, 3 ) ]
local SpawnVec3 = POINT_VEC3:NewFromVec3( ZONE:New( ZoneName ):GetVec3() )
SpawnAirplanes:SpawnFromVec3( SpawnVec3:GetVec3() )
end
do
-- Spawn Helicopters
local ZoneName = HelicopterZones[ math.random( 1, 3 ) ]
local SpawnVec3 = POINT_VEC3:NewFromVec3( ZONE:New( ZoneName ):GetVec3() )
SpawnHelicopters:SpawnFromVec3( SpawnVec3:GetVec3() )
end
do
-- Spawn Ships
local ZoneName = ShipZones[ math.random( 1, 3 ) ]
local SpawnVec3 = POINT_VEC3:NewFromVec3( ZONE:New( ZoneName ):GetVec3() )
SpawnShips:SpawnFromVec3( SpawnVec3:GetVec3() )
end
end, {}, 0, 15, 0.5
)