Been meaning to add a tycoon price changer in to my game but I am runningin to a problem.
The Code below does work but I am lost on how to make it randomly generate higher numbers by the players Level.
Here what I need the code needs to do.
If player level is 0 then just multiply the prices by 5 * Level for each upgraders and its Upgrades it will need to Mutliply by the number of upgrader so if it was upgrader 1 it multiply 5 * level * 1 if it was 2 then it multiply 5 * Level * 1 by 2 and so on. it will need to then randomize the prices I have it to random the numbers and not make it just even numbers. It does this 223549123 thats how it works now but I need a better system for handling the price changer.
for id=0,5,1 do if id >= 1 then local last = 0 for i=0,6,1 do if i >= 2 then local ma = math.floor((5.3+(id*(((1.1 + math.random())*((i+i)*id))^3.5)))*id) print(ma) else local ma = math.floor((5.3+(id*(((1.1 + math.random())*((i+i)*id))^4.5)))*id) print(ma) end end end end