monsterModule.SpawnMonster = function(folder, level)
local newLevel = level / originalLevel -- originalLevel = 1 (the start level)
local spawnRate = math.round(newLevel)
if spawnRate > 1 and spawnRate ~= level then
for i = 1, spawnRate do
SpawnMonsterFunction(folder)
end
else
SpawnMonsterFunction(folder)
end
end
Let me give context to this, so far I want to slowly scale the spawn rate of these "monsters"
to the "level."
(for example if the level is 4, then spawn 2 monsters. If the level is 29, then spawn 5 or 6 monsters)
The complicated part is to slowly DECREASE the amount it scales to not have 30 monsters spawn when you hit level 50. (to keep it balanced)
I’m horrible at math so any help is appreciated. Please ask questions if you’re confused
1 post - 1 participant