Can't get rid of my bosses :(

Help, please! I still pretty early in the learning stages here, and I've been searching via google but no luck. When I create a boss enemy, how do I make him get the hell outta here when I kick his butt?

For example, I make a boss named Steve, and place Steve in front of a chest -- I can make the battle happen, but when I beat him down all proper like, he's still standing in front of the chest waiting for me to fight again. How can I tell Steve to take a hike after I give him the boot? I've tried using Battle Event to control variables and switches when the HP = 0, but can't seem to make it work. Seems like this should be such a simple thing, but I'm at a loss.

Thanks in advance for the help!
The problem with using his battle event to do something when his HP = 0 is that the game will trigger the end of the battle before your battle event can process that his HP has reached 0. If you want to do it that way, you'll have to set the boss to add the state "Immortal" at the beginning of the fight (page condition Turn 0), and on the event page where the condition is his HP <=0, AFTER all your other variable changes and switches are done, remove the state "Immortal". This will then trigger the end of battle.
the easiest way to accomplish this is to tick the "can lose" option, when choosing the options for your "battle processing" event command. with this option ticked, you will notice a conditional branch is created below the event command's display in the interpreter; from here, you can use the "if win" condition to apply a self switch, allowing you to update the event's graphics, etc. to make it disappear from the map and clear the path to your treasure upon victory in the battlefield!
the easiest way to accomplish this is to tick the "can lose" option, when choosing the options for your "battle processing" event command. with this option ticked, you will notice a conditional branch is created below the event command's display in the interpreter; from here, you can use the "if win" condition to apply a self switch, allowing you to update the event's graphics, etc. to make it disappear from the map and clear the path to your treasure upon victory in the battlefield!
You don't even have to tick that option. Once the battle is over, it will continue event processing. Just do any other post battle effects and then throw a self switch. Then make another page that shows if the switch is on that is invisible and has no effect. To see a similar effect in action, right click on the map to make a chest, then look at how it uses a self switch.

Original thread: https://forums.rpgmakerweb.com/threads/cant-get-rid-of-my-bosses.86548/