Hud Help- Negative Variables?

So I've been trying to make a working hud for a while now.

I have 2 moving images, (and some not moving images around to frame them but those aren't important) and I want them to move left off the screen.

Like this basically:
L8wHHw5.png
Pzw98wq.png


Is there anyway to get like, a negative number from the "set hp/mp as variable" command? (As in, Hp is 100 so the variable is -100.)
Or do i have to do this the hard way and just set 100 conditional branches that subtracts 1 from the X of the image position for each HP? Would that even be possible or would it break the game with lag?

The mc is only gonna have 100 Hp and 100 Mp but thats still 200 checks.

Is there a script to let me do this(or something like this) easier? I've been looking but haven't found one that doesnt have the game draw things for you, and thats just a little bit ugly.

I would appreciate any help you can give me.
I don't understand why this would require that many conditions under any circumstances. (You didn't post your event)
Try to multiply the variables by -1 after setting hp/mp, then use those negative values to update the bars.

HP: 100
27 damage.
HP: 73 = HP_Variable
HP_Variable *= -1
HP_Bar = HP_Variable
HP_Variable = HP

(something like that)
I don't understand why this would require that many conditions under any circumstances. (You didn't post your event)
Try to multiply the variables by -1 after setting hp/mp, then use those negative values to update the bars.
(something like that)

Sorry i don't really get the explanation...
Did you mean like this?
UyU4ETZ.png

Cause if you did... It didn't work... Um. It just made the bars empty when I had no damage and full when I had 0 hp and mp.

Maybe it was my terrible explanation of what I needed. Or maybe I'm just not getting the answer.

How do explain it better. So I have the HP variable. The HUD bar is ath the correct position for full hp when the image is at 0 on the X axel. And When it's at no HP it should be at -100 on the X axel.
So 100 Hp should be 0 X and 0 Hp should be -100 X.



So I tried it some more after writing this but before posting, and I figured it out!
I needed to do complicated math stuff.... Well ,complicated for me.

The event ended up looking like this now that it works (maybe that's what you meant all along):
55LTNXY.png


Thank you for the help! 😀

Original thread: https://forums.rpgmakerweb.com/threads/hud-help-negative-variables.81433/