Displaying a message after combat is over.

It almost works as intended to.  Here what I am doing.   I am making a faction system in game when you kill a certain monsters in game

it increases a variable by that amount.  That is working flawlessly.

her is my issue, which the smaller issue is giving me a larger problem

I simply want to display a message,  " Your faction has increased by X amount" after a monster dies

-  I set an event that 0% or less it displays the message but the issue is with a second monster in the field the event does not show because the battle is over.  Is there a way around this?
the death-state is checked in combat before the HP-Value, so combat aborts before the HP=0% check for the last enemy.

There are several ways around this, but depending on your setup some solutions might be more difficult than others.

1) Make the enemies immune to death, and in the event you not only increase the faction value and display the message, but also remove that death-immunity (so that they die only after the message is displayed

2) There are some skripts out there (one by Tsukihime) that add more triggers to troop events, and one of those triggers is specially added to allow event processing after battleturn but before victory screen. Check those scripts, it might be that one of them solves your problem.
Are your monsters set up as events, or are you using Random Encounters?


If events, simply add a Show Text after the Call Battle Processing on each of your events. This would show it AFTER the battle screen closes, and you return to the map.
Maybe you can shove in a scripted variable increase += 1 during self.victory_process   This way the variable will always go up by 1, plus an extra 1 for every 2nd, 3rd, 4th (and so on) enemy kill that does get processed. (Because apparently with troop events, the 1st (or last) one will never process)
I've trying some different ways to do this.  Is the easiest to have the monster: 

- State Resist Death

then

- Run the script @ 0% health >   State ADD Death?
They are random events.
Whats the best why to remove a state from a monster?   Here is the issue that is occurring.  I go into the database and add Stateresist😀eath

then when the enemy hps hit 0 >  I add State😀eath

I don't see an option to remove state resist death.

----

The  issue is the way it is no. the monster does not die.
Siolenas, please avoid double posting, as it is against the forum rules. You can review our forum rules here. Thank you.

You add the state with "resist death" at the beginning of the battle by an event command, and remove the resist death state with another event command after the critical troop event has completed its messages.
Thank you for your help.  Issue Resolved.
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/displaying-a-message-after-combat-is-over.19365/