MV Event After Enemy Death

This might be obvious, but I haven't figured it out myself just yet so I thought I'd ask. So, I'd like to have my characters have a conversation after an enemy dies but before the victory screen. I know you can do immortal states for stuff when an enemy's HP hits zero, but I'm not sure if that's applicable to what I'm trying to do.
yes, you need that immortal state on the death of the last enemy to trigger the troop event before the victory screen, and then have those show text in that troop event.
To elaborate, you can do something like this:
  • Have a troop event with "Condition: Turn 0" and "Span: Battle".
    (This is to add the Immortal state to relevant enemies.)
    • Example contents~
      Code:
      ◆Change Enemy State:Entire Troop, + Immortal
  • Have a troop event for each enemy with "Condition: Enemy X HP <= 0%".
    Use "Span: Battle" unless their death should be counted multiple times.
    (This is to do stuff when the enemy dies.)
    • Example contents~
      Code:
      ◆Text:Actor1(0), Window, Bottom
      :    :Is...is it dead yet?
      ◆Change Enemy State:#1 Normal Rat, - Immortal
      ◆Text:Actor1(0), Window, Bottom
      :    :Phew! \.That was a tough fight!
  • The enemy should die as soon as the immortal state is removed, but the battle won't end until the event does. 🙂
If you have multiple enemies in the troop and you just want something to process when they're all down, you could set a variable to 0 in the "Turn 0" event, then add 1 in each "HP 0" event and check the variable's value: only do the extra stuff if the variable's value is equal to the number of enemies in the troop. This will involve using Control Variables and Conditional Branch commands, e.g.
Spoiler: Event snips
Code:
◆Change Enemy State:Entire Troop, + Immortal
◆Control Variables:#0003 BattleEnemiesKilled = 0
Code:
◆Text:Actor1(0), Window, Bottom
:    :Is...is it dead yet?
◆Change Enemy State:#1 Normal Rat, - Immortal
◆Control Variables:#0003 BattleEnemiesKilled += 1
◆If:BattleEnemiesKilled = 2
  ◆Text:Actor1(0), Window, Bottom
  :    :Phew! \.That was a tough fight!
:Else
  ◆Text:Actor1(0), Window, Bottom
  :    :One more to go!
:End
Okay, got it. Thanks @caethyril and @Andar.

Original thread: https://forums.rpgmakerweb.com/threads/mv-event-after-enemy-death.114805/