The concept is like in Gauntlet 4: the player's hp is constantly counting down to zero during play. Is there a way to script this in MZ, not in battle but while walking around and idling? This would be a constant countdown, so even when you use a healing item, it bumps the HP up but the number keeps counting down.
Making Player HP countdown to zero outside of battle
RPG Maker MZ SupportIf you want to do that in MZ, setup a Common Event that takes away 1 HP, wait for a second or two (60-120 Frames) and loop that. You'll need to turn on a switch to keep that running but it shouldn't be much what you need to do in order to get it done.
Hi, thanks very much. I will try this out. I appreciate it.
I better ask that now but do you need the character to lose HP in the battle too while idling?
No. just while they are walking around or idling on the maps. I was going to ask the specifics of the switch to keep that countdown running, and also carry over into other maps
Common events are not associated with maps.
Thanks. Are you aware of a script or plugin that could allow hp total to be displayed on screen at all times, and also show the countdown I'm talking about? I'm sure this is part of some plugins out there. I've searched a good sheet that has tons of plugins but didn't see anything.
I would do the countdown mechanic with a parallel common event and the HP bar and countdown number display with SRD HUDMaker (Ultra)
There is a simpler way to do this than with common events:
just give all your actors a negative HP regeneration trait (like on the poison state).
you might have to experiment a bit for numbers you like because HP regeneration is percentage based, but it would work automatically without anything else.
however you might make sure you allowed KO by slip damage in the database because otherwise that would stop at HP=1
just give all your actors a negative HP regeneration trait (like on the poison state).
you might have to experiment a bit for numbers you like because HP regeneration is percentage based, but it would work automatically without anything else.
however you might make sure you allowed KO by slip damage in the database because otherwise that would stop at HP=1
And this state would be added to the actors by parallel event? I don't think you can add a trait in the database actor traits that just inflicts a state, although I might have missed something
Edit: I've tried both putting an ex-parameter trait on the actor, and adding an "hp countdown" state by event, but I can't seem to get the HP to actually countdown.
Edit 2: Okay, I got the HP decrease to work, but it only happens while the actor is walking. Perhaps it's hardcoded to be based on step count... I haven't been able to find a work around yet.
you cannot add states, but you can add traits. and the HP Regeneration is a trait.
The only difference is that traits added directly are permanend, while traits added by state are only there while the sate is there.
yes, and there is no workaround because by default there is no time in the game itself.
In battle, the battleturns are counted to simulate tim and on map the steps are counted for the same.
for any other time to exist, it would have to be manually added (either by event or by plugin).
If you want such time effects instead of step effects, you'll have to tell us how you created that time and then we can tell you how to add the HP-Loss to that time-dependent case.
A parallel common event will run once every frame (1/60th of a second). To make it run less often you just use wait commands. A wait 60 frames at the end will make it run once a second.
Okay, thank you. I will work on that and see if I can get back with something.
Also, is the screen flash with each tick of negative regeneration hard-coded?
I don't know what Andar has in mind but I feel like this could have been done in two minutes
JavaScript:
$gameParty.leader().gainHp(-Math.floor($gameParty.leader().mhp*.01))
Wow. That worked perfectly. Thanks for taking the time. I appreciate your expertise.
Original thread: https://forums.rpgmakerweb.com/threads/making-player-hp-countdown-to-zero-outside-of-battle.162652/