Milena

The woman of many questions
Veteran
Joined
Jan 26, 2014
Messages
1,281
Reaction score
106
First Language
Irish
Primarily Uses
N/A
I would like to ask if there's a simple way to rollout the numbers in the battle status when you take damage? Rollout meaning I want the numbers to slowly change instead of them going directly to the value my hp / mp currently is. So if I have 10 hp and I got hit by 6, the HP number slowly drops from 10 - 9 - 8 - 7 - 6 - 5 - 4?
 

Resonance

Veteran
Veteran
Joined
Oct 25, 2015
Messages
43
Reaction score
6
First Language
English
Create another variable to keep track of "displayed hp".


In your functions that draw the text/bars, make it compare the "real hp" vs "displayed hp". When there's a discrepancy between the two, increment "displayed hp" towards the "real hp", then draw the new "displayed hp".


Now it'll just constantly draw new "displayed hp" values until it reaches the "real hp" value.
 

Milena

The woman of many questions
Veteran
Joined
Jan 26, 2014
Messages
1,281
Reaction score
106
First Language
Irish
Primarily Uses
N/A
It sounds like a possible idea, but wouldn't the oldHp variable something you can access inside the current drawn values? This means you have to get it inside drawActorHP itself. So it would just return the current HP rather than getting an old hp.
 

Kino

EIS Game Dev
Veteran
Joined
Nov 27, 2015
Messages
562
Reaction score
810
First Language
English
Primarily Uses
RMMV
One other option I think which is kind of like Earthbound, since they had hp that goes down slowly( this is if you don't want the actor to die immediately upon taking lots of damage).


You would essentially want to not really change drawActorHp.


Instead, when a character takes damage, you record that damage and subtract that damage from the actor hp over a certain amount of frames, until the recorded damage is 0.


The other option mentioned above I think still requires that you check when the actor takes damage, and you store their hp before the hit takes place that would subtract from their health pool.


I just checked and it seems BattleManager.invokeAction is where actions are invoked in battle; it takes a subject and a target parameter, so this might be a good place to make modifications or capture the hp information that you need.
 

Milena

The woman of many questions
Veteran
Joined
Jan 26, 2014
Messages
1,281
Reaction score
106
First Language
Irish
Primarily Uses
N/A
I will try this right now, thank you.
 

Latest Threads

Latest Posts

Latest Profile Posts

unintentionally made a track that sounds straight out of Yume Nikki
Revisiting one of my older projects in a long time to work some more on the mechanics. I've been working on- and off-again for about a year now on recreating the Force and Mystic systems from Wild ARMs. And I think I've finally made some good breakthroughs on that!

Still, it is not perfect and I may post my thoughts at a later time to see if there are any other suggestions or alternatives I've missed.
actor name string, why you gotta be case sensitive like that?
Doing RPG Maker News for 26th October 2021

My entire world, full of monsters and treasures, will likely be done by the end of the year. After that it's all NPCs and side quests... then done. I'm never making an open world game again xD

Forum statistics

Threads
116,106
Messages
1,095,857
Members
151,511
Latest member
jjjjjamjam
Top