HUD with Common Events Help

I’ve started working with HUDs, but I’m having trouble with the one I’ll be using for my project. The bars are supposed to represent Health & Invisibility. The question is, how I can make the pictures for the HUD move if the bars work with common events.

The Invisibility Bar works fine by now and it’s reduced when I press a certain button, but the problem is…..how can I make the player visible again after the bar depletes to 0?

Captura.JPG
(this is for the invisible mechanic)

Captura2.JPG
(And this is for the Invisivility Bar)

Meanwhile, the Health Bar….it’ supposed to work like this. The player’s visual range gets reduced and if they get hit 4 times, it’s Game Over. Originally I planned to use this method, but I don’t know how to adapt it into a Health Bar for a HUD. (Btw, I’m using Galv’s Visual Range Script, just in case.)

h1.JPG h2.JPG h3.JPG h4.JPG

Thanks for reading this, and I hope someone will know how to deal with this problem
You're using two different common events to handle visibility, and four for health... Consolidate.
Two common events is reasonable for what you're doing.

Use a variable for health, set it four, reduce it by one whenever the player receives damage.
Check the player's health using a conditional branch for each value.
Add an exception so that the value isn't being set constantly.
When it comes to parallel processes, be as efficient as possible.

As for invisibility, make it into one event.
Obviously there's no HUD included, but check out my example below.
Spoiler: Common Event
invisible_01.PNG
The problem is how can I make the character turn back to normal after the Invisibility gauge reaches 0.
It's in the example. I used the player's MP as the invisibility gauge.
MP is stored in variable [0030:Inv], and Max MP is stored in variable [0031:Inv Max].
While holding down the Y button, if the player's MP is not greater than 0, Jump to Label: Cancel Invisibility.
It's in the example. I used the player's MP as the invisibility gauge.
MP is stored in variable [0030:Inv], and Max MP is stored in variable [0031:Inv Max].
While holding down the Y button, if the player's MP is not greater than 0, Jump to Label: Cancel Invisibility.

Yes, I noticed and now it works perfectly. I never thought about converting it into MP.

But what I do with the HP bar now? The player is supposed to slowly regenerate and if they're damaged, the vision gets darker (like an overlay)
You can use HP in a similar fashion.

For flexibility, I would set HP to 1000 (easier to work with) and have the player take 250 damage on average.
As for vision range, something like this:
Spoiler: Common Event
invisible_02.PNG
Based on what you've shown me.
You can use HP in a similar fashion.

For flexibility, I would set HP to 1000 (easier to work with) and have the player take 250 damage on average.
As for vision range, something like this:
Spoiler: Common Event
Based on what you've shown me.

Okay, it works perfectly now, but how can I make the character slowly regain health? I did this, but it doesn't work....

CapturaHP.JPG
It's not working because you're setting MaxHP to be equal to HP (player's current HP value).
Your event is missing a variable, Record HP, which keeps track of any changes to the player's Current HP (or HP in your event).
Spoiler: Common Event
invisible_03.PNG
Yes, it's almost done! Also, last but not least.....how can I make the player not regain health if they're running?
Probably conditional branch -
if button :A is pressed down
nothing
else
character hp + 1
branch end

Original thread: https://forums.rpgmakerweb.com/threads/hud-with-common-events-help.79667/