This commit is contained in:
iTracerFacer 2024-11-15 10:29:57 -06:00
parent fe393f19d4
commit deaba0f291

View File

@ -1,7 +1,7 @@
--[[ --[[
Script: Moose_DynamicGroundBattle.lua Script: Moose_DynamicGroundBattle.lua
Written by: [F99th-TracerFacer] Written by: [F99th-TracerFacer]
Version: 1.0.2 Version: 1.0.3
Date: 11 November 2024 Date: 11 November 2024
Updated: 12 November 2024 Updated: 12 November 2024
Description: This script creates a dynamic ground battle between Red and Blue coalitions Description: This script creates a dynamic ground battle between Red and Blue coalitions
@ -166,8 +166,7 @@ local blueWarehouses = {
STATIC:FindByName("BlueWarehouse3-1"), STATIC:FindByName("BlueWarehouse3-1"),
STATIC:FindByName("BlueWarehouse4-1"), STATIC:FindByName("BlueWarehouse4-1"),
STATIC:FindByName("BlueWarehouse5-1"), STATIC:FindByName("BlueWarehouse5-1"),
STATIC:FindByName("BlueWarehouse6-1"), STATIC:FindByName("BlueWarehouse6-1")
STATIC:FindByName("BlueWarehouse7-1")
} }
-- Define templates for infantry and armor groups. These templates will be used to randomize the groups spawned in the zones. -- Define templates for infantry and armor groups. These templates will be used to randomize the groups spawned in the zones.
@ -746,7 +745,6 @@ local function CalculateSpawnFrequency(warehouses, baseFrequency)
return frequency return frequency
end end
-- Function to calculate spawn frequency percentage
local function CalculateSpawnFrequencyPercentage(warehouses) local function CalculateSpawnFrequencyPercentage(warehouses)
local totalWarehouses = #warehouses local totalWarehouses = #warehouses
local aliveWarehouses = 0 local aliveWarehouses = 0
@ -763,7 +761,7 @@ local function CalculateSpawnFrequencyPercentage(warehouses)
end end
local percentage = (aliveWarehouses / totalWarehouses) * 100 local percentage = (aliveWarehouses / totalWarehouses) * 100
return percentage return math.floor(percentage)
end end
-- Add event handlers for zone capture -- Add event handlers for zone capture