- Home /
Question by
danielmchugh · Jul 09, 2016 at 02:33 PM ·
formula
Working out how much it will cost to buy a set amount of buildings.
Okay so i am building an incremental game and have a formula to work out how much it will cost to buy a set amount of buildings.
This formula is as follows:
((BaseCost * (1.07^b - 1.07^a)) / 0.07)
BaseCost = Starting cost of buildings.
a = number of buildings i already own.
b = number of buildings i will own after buying
This formula will give me a cost if i give it a set amount i want to buy.
But i need to work out how many i can buy with a finite amount of money, without giving it a set number.
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612084520im_/https://answers.unity.com/themes/thub/images/avi.jpg)