Enemy Death/0% HP Battle Event

I am trying to have a boss say a line of text when his HP is 0, but before he "dies" on screen.

How I tried making the enemy immune to Death, but then when I script add Death to him, it still doesnt work.

How do I have the boss say something just before he dies in the battle?
The idea to make the boss immune to death is the correct one, but you need to remove the resistance to death after the message is displayed.


There are several ways to do this, I suggest adding the resistance by troop event run once at turn zero, then remove the resistance again after the message has been displayed. The death should follow automatically if the boss is still at 0 HP.
How do I change the resistance within the Battle Events?
If you add this script, you can use your 0% HP event without changing anything.


http://himeworks.com/end-phase-triggers
I think I'd rather use the changing resistance thing instead of installing another script, that I'd probably only use once.

But, again, I dont know how to change enemy resistances through scripts.
How do I change the resistance within the Battle Events?
Make a state "immortal" with resistance to death and add that state by the event command "change enemy state".
Place that command in the troop events, and have that event run on turn 0 only.
Got it. Thanks!
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/enemy-death-0-hp-battle-event.25524/