Battle process question.

So I'm making a monster recruiting system. If you defeat the monster a variable is set that corresponds to that monster. This sets up the recruit processing.

The only problem is that it does not work for the last monster killed as it gets overridden by the end battle process.
The same issue occurs when a move defeats all the monsters in one turn.

Is there any way to make a variable or switch activate right before the end of the battle? Would a script be needed or could I just edit the games battle system?
It is a known quirk of the battlesystem, cause by the battleend being checked and processed before the troop events.
There are several solutions to this, most people make an immortal state that is applied to the enemy and removed if the troop event detects HP=0

Another solution would be Tsukihime's script for additional troop event triggers, that has triggers to specifically prevent this quirk.
I'm guessing it's the end phase triggers script?

Thanks I'll look into both and see if these fix my problem.
HIME come in the clutch yet again.

This thread can be closed!
@slimeborgi If you want your thread closed, please Report the opening post and ask for it to be closed. Mods might not see your post, but we will see a Report.
Thanks.

Thread closed IgnoreMe

Original thread: https://forums.rpgmakerweb.com/threads/battle-process-question.78649/