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.


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
RPG Maker Web attachments are mirrored locally when available. Other external links remain hosted by their original creator or third-party service.
- Local mirror: 236929-8b3fbdc226ca840e23cdcac19ed0849e.png
SHA-256:6eadd81dc2b2be05ea0bb2a16846afd96d44ff957aba975b6f14227c5ce6f6ef
Original attachment URL: https://forums.rpgmakerweb.com/attachments/1680541429342-png.257849/ - Local mirror: 236930-cc7245ebad37c1767f2ad1291d0f293b.png
SHA-256:37ba4c13d1f113d97c4f88924a1483b7f67fb34439b3f98b5c5d2d58010ed283
Original attachment URL: https://forums.rpgmakerweb.com/attachments/1680541476600-png.257850/
Referenced 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...