Battle script if all enemies other than user are dead

Hello guys!

I tried to search the similar issue but found nothing, sorry if this question was posted - you can throw me a link if there was a similar topic.

I need an enemy to summon reinforcements, made it with a common event inside combat, but I need an IF command in there, that works if ALL THE ENEMIES except boss (unit 1) are dead. (He calls a single guy, when that guy dies calls another one).

The new enemies are considered the +1 guys, so the check if the enemy 2 is dead not working.

Can you help me with a script call for that?
you can throw me a link if there was a similar topic.
😉
I Googled "rpg maker troop event enemies dead" - that's just the first page of results 😉

But the easy way to do this is to use HimeWorks' End Phase Triggers plugin (works fine in MZ) so that troop events can be triggered/run after the last enemy has died.

You might also check out caethyril's MZ Tweaks, it has an enemy reinforcements functionality that might be easier than you eventing it all manually.
I tried to search the similar issue but found nothing, sorry if this question was posted - you can throw me a link if there was a similar topic.
Just FYI, the search functionality of this site is a little (very) wonky, so it's better to use e.g. google to search within this site.
😉
I Googled "rpg maker troop event enemies dead" - that's just the first page of results 😉

But the easy way to do this is to use HimeWorks' End Phase Triggers plugin (works fine in MZ) so that troop events can be triggered/run after the last enemy has died.

You might also check out caethyril's MZ Tweaks, it has an enemy reinforcements functionality that might be easier than you eventing it all manually.
Hey thanks for the reply. Yes, tried to search here, better to go to google I guess.

Good list you have there, but I'm not sure how to use them - need to check if every guy except user of the skill is dead. (Like a mob boss calling the new henchemen after the death of previous hencheman), so the one guy is still in there at troop and not all the enemies are dead. I thought maybew there is a simple script for IF for that.
Just FYI, the search functionality of this site is a little (very) wonky, so it's better to use e.g. google to search within this site.

Thanks for the advice!
Good list you have there, but I'm not sure how to use them - need to check if every guy except user of the skill is dead. (Like a mob boss calling the new henchemen after the death of previous hencheman), so the one guy is still in there at troop and not all the enemies are dead. I thought maybew there is a simple script for IF for that.
There's no need to make a script for that, you can use the regular troop event triggers with Conditional Branch commands.

But if you really want to use a script, it's
Code:
$gameTroop.aliveMembers().length==1
There's no need to make a script for that, you can use the regular troop event triggers with Conditional Branch commands.

But if you really want to use a script, it's
Code:
$gameTroop.aliveMembers().length==1
That is it! Thanks a lot!

Original thread: https://forums.rpgmakerweb.com/threads/battle-script-if-all-enemies-other-than-user-are-dead.166167/