Multiple Enemy Troops and End of Battle rewards

Hello RPG Maker community, this is my first time posting and I have a noobish question.

In my game, I want to give the party a full recover whenever they win a battle. I have achieved this in both events, and single enemy random encounters, however when a player enters a random encounter with multiple enemies, the command I use (Condition: Enemy [blank's] HP is 0% or Below @> Full Recover) will heal directly after that enemy dies. I want the party to recieve the full recover when they defeat the entire troop, rather than just one. How would I go about that?
Nah, going about it the wrong way.


Just create a common event that's set to parallel process and give it a switch as a condition. Add the command to recover the entire party, and then turn the switch off.


In each of your troops, create a troop event that runs right at the start of the battle and turns that switch on.


What will happen is that you'll go into a battle, the switch will be turned on, you'll win the battle and go back to the map, the common event will run, the party will recover, and the common event will turn itself off.


This will then work for evented battles, random battles with a single enemy, or random battles with multiple enemies. Doesn't matter what kind of battle it is.


You don't need to do it after defeating enemies, as common events don't run during battle (unless you're using a script that makes them), and if you lose the battle, the game ends and the player has to go back to a previous save, which means the switch will be off and the common event won't run when they load their saved game.


The only time this will be an issue is if you allow the player or enemies to escape from battle.
Just tried it and it works perfectly, thank you for the help!

Also just for clarity I have to remake the event for each map?
For a common event, no, but you will need to copy/paste the troop event for every troop you use.
Ok sounds good. Thanks for assisting me!

Original thread: https://forums.rpgmakerweb.com/threads/multiple-enemy-troops-and-end-of-battle-rewards.41825/