Enemy dialogue just before death?

I want to have an enemy say something right before he dies during battle. Basically, you fight the boss to 0%, he says his last words, and then the death animation.

I tried setting a "Show Text" command in a battle event and set the trigger for when the boss's HP is 0% but when I tested the battle, he just dies and the text does not show.

I verified that the trigger is indeed set to boss's HP is 0% and made sure it is set to "battle" but the boss;'s dialogue does not show at the end of the fight.

I tried it with another troop with text saying "That was a great rematch" but again, no text is displayed upon death.

Does anybody know what the problem could be? I have my troop setup like this:


1687663522377.png

Page 1 is just her opening words
Have you tried to make the enemy immortal before dying? Or even after getting its HP reduced to... less than 10%?
10% won't cut it. Sure it will say the dialogue, but I want it at the very end.

I do not want to make the boss immortal because then he cannot die.
That's the idea. If the boss gets immortal by having only 5% HP left and then gets hit again and it reaches 0%, then there's time to speak up about how it feels about the defeat and then make it mortal again. It should collapse as usual.
I believe the technique was to make immortal -> do stuff -> make mortal -> inflict death state (because immortal keeps the hp at 1)
Then how do I set up the conditions? 1 HP is not 0% but 1% HP from 100,000 HP is 1000 HP
this works
1687705959385.png

my second tab is adding immortal to enemy 1.
You did not read that right.

I cannot use 1% when a monster has 100,000 HP or over because 1% of 100,000 is 1000. Setting it at 1% can cause it to trigger early with enemies that have high HP (party is over 100 right now with Yanfly Adjust Limits script
You did not read that right.

I cannot use 1% when a monster has 100,000 HP or over because 1% of 100,000 is 1000. Setting it at 1% can cause it to trigger early with enemies that have high HP (party is over 100 right now with Yanfly Adjust Limits script
I guess because the battle scenario only runs once.
Hime fixed this by adding another span.
So you need that as well. I tested the condition of less than 1% hp and it works with battle span set and the comment for Hime's span.
According to that page, all that does is perform the page's events after every attack instead of turn, moment, or battle. It does not help me with the 1% issue
It does not help me with the 1% issue
It does.
Have you tried?

The extra condition might need to be set to hp == 1 instead of 0 though.
There is no way to set up a condition to ==1 HP. There are only percents
Did you not see this?
1687729849723.png
According to that page, all that does is perform the page's events after every attack instead of turn, moment, or battle. It does not help me with the 1% issue
This is the perfect example of you reading what other people write down and just go "That won't work!" and yet you didn't even try it.
I tested what I mentioned and it works, so don't say it doesn't.

You should have the common curtesy to actually try the things we say and then tell us if it doesn't work.
I'm going to step in.

@MoltresRider No one is obligated to help you AT ALL. Everyone here works on their free time without pay. The minimum you can do is show common courtesy.

As for how to solve it:

Give boss immortal state (yes you read that right, it is REQUIRED. Read the rest)
Set a condition to fire at <= 0% HP
In that event on that condition do all three of these:

Have the boss say its line
remove the immortal state
Add state KO to the boss

Works just fine in every game I've made so if it does not work for you its something unique to your setup.
Give boss immortal state (yes you read that right, it is REQUIRED. Read the rest)
Set a condition to fire at <= 0% HP
In that event on that condition do all three of these:

Have the boss say its line
remove the immortal state
Add state KO to the boss
damn, I didn't even try to set it to 0, lol.
Yep works perfectly.
Yeah, it should work because 0% doesn't really mean 0 HP for Ruby or RGSS because it's just using Integers not Floats so it will treat 5 o 250 HP as 0% if the boss was configured as having a huge amount of MHP for any reason.

Original thread: https://forums.rpgmakerweb.com/threads/enemy-dialogue-just-before-death.158661/