Help with adding "Low Health" alert

DSBwizzard

Warper
Member
Joined
Jul 5, 2018
Messages
1
Reaction score
0
First Language
English
Primarily Uses
RMMV
Hello all, I am working on a project and would like some of the community's help figuring this one out.

My goal is to have a sound effect fire off any time an actor's HP drops to, or below, a set threshold - maybe 25% - as a warning to the player. This warning sound would not sound off again until the Actor's HP is brought up ABOVE this threshold, and then back to the warning limit. (I am not looking for a constant beeping sound, a one-off "this character is in danger" trill is all.)

I'd like this sound to fire off per-character. For example, if "Mark" takes a hit and drops to 20% of their max HP this sound fires, and then in the same round if "Lisa" takes poison damage and drops to 17% of their max HP, this sound would fire again. If Mark and Lisa do not change their health or it drops lower the sound does not fire, since neither of them went "above" the 25% warning threshold, thus "resetting" the warning.

I currently have an extremely simple Troop Event on my troops but this only fires once, for the 5th actor in the database. (This was mostly created as a proof of concept.)


I've done some searching through these forums and the web but could not fin any real solutions, however I admit I could easily have missed something so any help or points in the right direction are very appreciated.

As I write this out it appears more and more complex... If this is best / only achievable via a custom script that's alright, and I can work on that later. I'm wondering if this is (reasonably) attainable via events etc.

For reference I utilize a lot of Yanfly's engine scripts.

Thanks a ton guys!
 

Traverse

Veteran
Veteran
Joined
Jul 3, 2014
Messages
161
Reaction score
102
First Language
English
Primarily Uses
You might want to set the span of that event to "Turn" instead of battle. If the span is "Battle", as you know, it only fires once in the entire battle.

You could try using a second event to check if the HP is above the limit and set a switch/variable to be turned on whenever it happens. Then run a check in the event triggering upon <limit HP to see if the switch/variable was on and play the SE if it was, and then turn it off (so that it won't come back on until HP goes >limit, which is when the other event triggers again and turns it back on).
 

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,977
Members
137,563
Latest member
cexojow
Top