Forgive me if something similar was already posted, feel free to link me to that thread if so.
So I'm writing a game in which stats can be increased through training, but how much said stat is increased depends on the level of your training center. The amount of money it costs to train that stat also depends on that training center level. So let's say you want to increase your Speed stat - at training center level 1, it would cost $25 a "session" (session being the link to train being clicked) and increase your Speed stat by 2 points. But if I upgrade my training center to level 2, it would then cost $50 a session and raise your stat by 5 points. At levels 3 and 4, the stat increases via multiplication (2x and 3x).
I do know how to change variable values through links, but I haven't quite figured out how to go about changing variables based on the value of another variable. My assumption is some sort of If/Then statement with the stat/money variables and the training center level variable, but I haven't done much scripting in CYS games so I'm not entirely sure how to format that in a link script or some other kind of script as needed.