I have a script that decreases a number by percentage but is there a way to tell how much exactly number been decreased? I know the formula of how to tell how much a number has been decreased by percentage but i can’t really use it in lua since it gives off a very low number.
local t = __TIX.Value
local d = math.floor(GameEngine:RemovePercent(__TIX.Value, 0.20, "+"))
print(d / t * 100)
-- function
return __TIX.Value + __TIX.Value * -0.20
What i’m trying to do is check how much the value has been gone down exactly just like how percentage work irl. Where we divide the decreased number by the original number and then multiple the given result by 100, but i can’t use that formula in lua.
Sorry, I’ve no idea what this means. Can you post some example numbers and show what calculation you mean, like what you expected the results to be for some given numbers?