Game over switch

Hi, I wanted to add a secret boss if the player makes it through the entire game without dying, yet I can't seem to find a script that can tell if the player has died and seal off the boss.  Thanks in advanced.
The reason you don't find a script for it is, this can be easily done using eventing in a few patterns.


eg 1,


Add a common event to keep track of death in troops events.


eg 2,


Add a common event to keep track of revive in item/skill.


And depending on the scripts and battle scripts you use, the methods can be different.

Original thread: https://forums.rpgmakerweb.com/threads/game-over-switch.56601/