I'm just not able to figure this out.
I want to have a percentage chance of something happening based on the evolution factor.
So at 1% the chance if it triggering would be 1% and at 100%, a 100%.
I have
Code: Select all
local attack_chance = math.random(100)
if attack_chance < math.floor(game.evolution_factor*100) then
--- something happens
end