Sound effects depending on HP level

I need to know how i can create sfx event when HP of the character/enemy drops below certain point. I am now using a plugin which changes the enemy sprite in battle depending on his HP level and this transformation must be accompanied by a sound effect.
So, generally speaking, i don't want my ogre to growl each time he gets hit, i want him to scream when he turns into second phase, when his HP drops below 50%.
In the troop settings you could create a Moment event that does what you need when the enemy hp is below 50%. Just don't forget to set a variable to turn it off!
In the troop settings you could create a Moment event that does what you need when the enemy hp is below 50%. Just don't forget to set a variable to turn it off!
Thanks, that's exactly what i need.
In the troop settings you could create a Moment event that does what you need when the enemy hp is below 50%. Just don't forget to set a variable to turn it off!
I have one more problem. I created a common event where animation is played and the enemy is transformed from the first form to the second. But the problem is that the transformation is triggered instantly, while the animation is not yet complete.
Could you tell me please how to make the transformation take place after the animation has finished? I tried to use a timer and the condition that the transformation takes place after time, but in this case the battle just ends with the time runs out.
I don't understand why/how this would end your battle. Can you screenshot your common event please? I presume you're calling it in your Moment troop event?
I don't understand why/how this would end your battle. Can you screenshot your common event please? I presume you're calling it in your Moment troop event?
I am already solved it, just simply add a screen shake for a minimal possible time after the animation( the problem was in the "next action mechanism" in the event. When animation starts, it already jumps to the next action, without waiting for animation to end, but if you add some action in between, system will be waiting for the end of the animation, before jumping to the next action).
But as for the ending of the battle, i did it like that:
1-show animation
2-start timer (1 sec)
3-if timer <= 0 sec --->transform enemy
4-end
1.PNG

I am newbee in RPGMV, so i never before used the"IF" condition, i guess the problem is in the"END" string.

Original thread: https://forums.rpgmakerweb.com/threads/sound-effects-depending-on-hp-level.129457/