Hi,

So, the thing is, how do I get an equation to always return a natural number?

For example, I have this equation right here:

Do + (GlobalVariable(tankgundamagelevel))-(GlobalVariable(bossarmorlevel))

now, I’m implementing some upgrades to both things, but, if at any point the first variable is lower than the seccond it’s going to return a negative number, thus renedring the boss unkillable.

Please let me know if there’s a way to make equations always return a natural number, and if there’s a way to apply this globally to the whole project so I don’t have to change 100000 things.

Thanks!

UPDATE: ok so I fixed this in the following way:

I replaced all armor values in equations in order to use a percentage instead of a number:

(turret.Variable(tankgundamage)) + (GlobalVariable(tankgundamageupgrade)) * ((enemy.Variable(enemyarmor)) - GlobalVariable(enemyarmorupgrade)) / (GlobalVariable(percent))

Equation explanation:

Damage dealt + Damage upgrade level * enemy armor - enemy armor upgrade / 100 to variable enemyhealth of enemy

(2 + 1) * (10 + 1) / (100)

It’s complicated but it works perfectly! ( you may want to use higher numbers so you don’t get decimals)