Script that keeps track of damage dealt to the player.

void_of_the_mind

Villager
Member
Joined
Jun 9, 2018
Messages
16
Reaction score
5
First Language
English
Primarily Uses
RM2k3
Hello all, I have run into a snafu that I'm curious if anyone has an idea on how to implement this:

Essentially, I wish to have a parallel event that runs continuously during the game that uses a conditional branch that keeps track of the player when playing as the protagonist. I want to have a variable run a check every 30 seconds to determine if the protagonist's health is at or below 75%. For every 30 seconds that pass and the protagonist's health is at 75% or lower, 5 points is added to a common event that can dictate certain situations that happen later. I want it to be that if the protagonist's health is above 75% during this check, 1 point is added to the contrary of the common event that is keeping track of lowered maximum health... sorry if that is confusing.

Think of it like a system similar to how Silent Hill 2 keeps track of the player's health to determine endings... idk I've fiddled with the variable selections and tried to write up the event but I can't seem to properly write out the script needed to fulfill this.

If anyone has any feedback on this I'd appreciate it.
 

Frostorm

[]D[][]V[][]D aka "Staf00"
Veteran
Joined
Feb 22, 2016
Messages
1,591
Reaction score
1,168
First Language
English
Primarily Uses
RMMV
Yea, I should've elaborated. My intention was that maybe he could use that built-in statistical function to extrapolate his variable since half the work is now done for him thx to the plugin.

Edit: On second thought, OP wants to check % of Max HP instead of a hard value of damage received, which actually seems easier. It would just be an if conditional that checked MaxHp.
 

void_of_the_mind

Villager
Member
Joined
Jun 9, 2018
Messages
16
Reaction score
5
First Language
English
Primarily Uses
RM2k3
Yea, I should've elaborated. My intention was that maybe he could use that built-in statistical function to extrapolate his variable since half the work is now done for him thx to the plugin.

Edit: On second thought, OP wants to check % of Max HP instead of a hard value of damage received, which actually seems easier. It would just be an if conditional that checked MaxHp.
That seems like a great idea! I'll get the plugin and see if i can find the proper scripts for writing the event i plan, otherwise if it came to it i could potentially just have the events trigger based on the numbers that are being tracked anyways.
Thank you!
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,849
Messages
1,016,975
Members
137,563
Latest member
cexojow
Top