How to have a constantly updating variable that is equal to the Player's Current HP?
BMM Archive · July 15, 2026
Original Source
- Original title: How to have a constantly updating variable that is equal to the Player's Current HP?
- Original author: coldReactive
- Original date: April 3, 2023
- Source thread: https://forums.rpgmakerweb.com/threads/how-to-have-a-constantly-updating-variable-that-is-equal-to-the-players-current-hp.156377/
- Source forum path: Game Development Engines > RPG Maker MZ Support
Summary
I've already seen and tried the parallel process in the initial scene (I also have an autorun playing at the same time due to a cut-scene) from the following threads: Setting a variable when the game starts I am using a code in the materials section to make sure that the first 5 variables in my project are set when the game starts. This is my code: class forums.rpgmakerweb.com
Archived First Post
Setting a variable when the game starts
forums.rpgmakerweb.com
Set variable before starting game?
forums.rpgmakerweb.com
But when I try to call the variable through an If Conditional to check if it's less than or equal to 1. The event won't start. The event tile is on a tile that can't be moved onto, so I've set it to action button. Yes, the priority is set to "Same as characters" so that it actually works when interacted with by the player.
But the variable checking event simply doesn't work. It has to check if the variable is set to 1 or lower, or else the event doesn't start. Since it isn't starting, it seems like the variable isn't being set in the first place (or isn't being updated.) On the parallel process I've set the #0001 Variable to whatever the player's HP is; and I need this variable to constantly be updating even when the player changes maps so that I can check how much the player's HP is to trigger an event like this.
Protected download
Protected download
There's no conditional branch to check the player's current HP directly, has to be set to a variable and checked.
That's one reason why I wanted to figure out a way to stop Game Overs in a previous thread I posted: https://forums.rpgmakerweb.com/inde...eaches-0-dead-state-from-damage-tiles.156376/
Downloads / Referenced Files
Log in, then follow the RPG Maker Developers Group to see these download links.
Log in to downloadReferenced Images / Attachments
Creator Claims / Removal
If you are the original creator and want this listing reassigned, edited, or removed, join BMMPlay and contact the moderators with proof that matches the original RPG Maker Web profile, linked GitHub, itch.io page, or another public creator identity.
Replies (0)
No replies yet.
Topic Summary
Loading summary...

