If you learned Scale Factors in Algebra then you should be familiar with this term.
But anyways, my idea is to use math like where you have 2 fractions. But you put this into like an 'if' statement.
Like for every 1/5 25 is subtracted from a variable.
Does that make sense?
I'm having trouble understanding exactly what you want but is it something like this?
local a, b = 100, 100 local aScale, bScale = 1, 5 local function Add(amount) a = a + amount*aScale b = b + amount*bScale end local function Subtract(amount) a = a - amount*aScale b = b - amount*bScale end
Using this, if you called Add(2)
, then
a = 100 + 2 * 1 = 102
b = 100 + 2 * 5 = 110