Run event after enemies defeated?

Hello, long time lurker first time poster.

So here's what I've got: I have a map with wandering enemies. I'm trying to figure out how to have a boss fight occur after defeating all of them and I'm not sure how to pull that off. Do I need to make an individual switch for each enemy, or is there a way to call the boss fight with a variable or something?

The flow that I want is this: explore map >>> defeat all wandering enemies >>> spawn boss on map.

Thanks in advance!
I'm just a taaaad bit confused on what exactly you want since your title sounds like something different than what you showed in your flow. But either way, this is very easy!

In regards to your flow:
Make it to where when the player defeats an enemy on the map, it "adds" 1 to some variable you create.
(In other words, under the "Win" condition of a battle sequence in the event maker, Make a variable "add 1".)

Then, once the variable is at some number x that you want, make THAT variable the starting conditions (1st page) of your Boss enemy event. Should be the very big checkbox list at the top left of the event maker.

This will make it to where the moment that variable is at...say for instance, 3. Then the boss enemy will appear!


In general though, if you want a specific event to happen after you defeat an enemy, you should always go to the "Win" condition of your battle sequence, and input the necessary code for the events you want.
no, the better way is to count up an enemy counter for each finished battle.
then have the boss event conditioned on that variable to be higher or equal to the numbers of enemy event that count up on the map.
the boss will appear automatically if you do that.

you can even reuse the counter if it is always set to zero on entering a new map.

EDIT: ninja'd
Aahhh, excellent. Thank you, that makes sense. I'll give it a shot.

Thanks much.

EDIT: Just tested it, works perfectly!
Variables.

Each time you defeat an enemy event > +1 to variable Boss (example).

If you have 5 enemies, put a Condition Trigger in the Boss event to show up when the variable Boss is > 5.

I have a full lesson about variables on my game-tutorial project, if you want to check it out! 😉
Oh nice, thanks much, I'll take a look.

Original thread: https://forums.rpgmakerweb.com/threads/run-event-after-enemies-defeated.150008/