Plugin Contributor
Savvas
(@savvasha)
Hi @nickjp ,
Did you try something like
Total = (CurrentHCP < 71)*70 + (CurrentHCP > 319)*320 ?
Thanks,
Savvas
Thread Starter
NickJP
(@nickjp)
Yes, that gives the correct result for the outlying cases, but not for those between the floor and ceiling. Without some sort of if > then conditional statement, I don’t see how I can have a formula that sets the value correctly for all players.
Plugin Contributor
Savvas
(@savvasha)
Well you can try the following:
Total = (CurrentHCP > 70)*(CurrentHCP < 320)*CurrentHCP + (CurrentHCP ≤ 70)*70 + (CurrentHCP ≥ 320)*320
Thanks,
Savvas
Thread Starter
NickJP
(@nickjp)
Thanks, I’ve spent a while playing around with it, but can’t get it to work. I created a variable currenthcp in the hope that it would get populated with the result of my existing CurrentHcp = StartingHcp + (10 * (GamesWon – GamesLost)) equation, and then used currenthcp in your suggested equation. But it looks as though the currenthcp variable doesn’t get populated from the equation, as using it doesn’t give a valid result.
Is it possible to use the output of one equation in another without reproducing the entirety of the first equation everywhere that its output value appears in the second?
Also, is it possible to define additional constants beyond the default available values of 0-10 and 100? At the moment I’m using (7*10) for 70 and (8*4*10) for 320.