Sorry for the strange question, what I want to do is:

- A Battle Power Var, which increases or decreases if HP / Energy var does.


You have 50% HP and 100% KI = 75% BP.
You have 0% Ki and 100% HP = 50% BP.

So yeah, HP would be 50% of BP and KI 50% of BP.

I don't have any idea of how to make this, I even asked my friends, and they don't either have any idea.

I'd also like to make a MaxBP Var, I have it already coded, but I don't know how to link it with BP, since I don't either know how to do what I've just asked.

Aff, I'm too confused ): Thanks...
This would be fairly simple to do, however the trickier part is deciding when to call it.


var/H = Health/MaxHealth
var/K = Ki/MaxKi
var/A = (H+K)/2
src.Power = src.MaxPower * A

Find the percentage of health and ki, then multiply the max of power by that number, simple.

Now, to make it useful, you need to call it whenever someone would take damage or expend energy. If you already have a proc that is being called in these instances (say, to update screen_obj's for a hud) you could call it inside of that proc, or vise-versa.