Can I trigger an event based on number of enemy units?

I’d like to make a chapter (in an FE7 hack) where a certain event gets triggered when there’s only one unit left. I’d assume there’s an event that gets called or a flag that gets set when this happens (to play the Winning Road song), but I can’t find it.

1 Like

Does FE7 have a command to check the number of enemies (FE8 does)? If so, you can make a range event across the map that first checks the number of enemies and only runs the script when one is left (don’t set a completion flag). In order to not have it play over and over until the last enemy is defeated, you would need to set up an internal completion flag where the script sets a flag and then the flag is checked for at the start of the event along with the number of enemies.

If there is a command that does that, I haven’t been able to find it.
I’ve looked at every command that has the word “Unit” in the name and haven’t seen it, and FE7 doesn’t have any commands with the word “Check” in the name, so it’s clearly a different name than in FE8, if it exists at all.