a sample is inside the helpfile, on victory common event, you do:
$gameTroop.aliveMembers() < 1
on defeated common event if used:
$gameParty.aliveMembers() < 1
this is a conditional branch that runs the code
once all enemies or actors are dead.
if you add an else Handler, you can do another
thing or debug with x members left/alive.
if you need further assistance, please reply back
on what you seek and I do my best to help you out.