How do I...transition to the game to Game Over screen?

I keep trying to make a skill called stone gaze that OHKO's the only party member. But every time when I test it in battle testing, my guy gets turned to stone, and the battle keeps going on. Like, the enemy constantly attacks even though my party member can't move. I can't seem to figure out how to make it to where it takes you directly to the game over screen if he gets stoned.

Thank you~!
By default, a game over will only occur if the allDead function of $gameParty returns true. That function checks the parent function in Game_Unit, which checks each battler's isAlive function, which is:

Code:
Game_BattlerBase.prototype.isAlive = function() {
    return this.isAppeared() && !this.isDeathStateAffected();
};

isDeathStateAffected is:

Code:
Game_BattlerBase.prototype.isDeathStateAffected = function() {
    return this.isStateAffected(this.deathStateId());
};

And deathStateId returns 1.

All this means that the default system will only consider it a "game over" if every party member has state 1 (death). If you want to include other states in this consideration, you'll have to add them to either isAlive or isDeathStateAffected as checks for the ID of your petrify state.
@PoptartPresident, I feel a far less complicated solution for you is to just to get Incapacitate States for MV, since it sounds like exactly what you need.
@PoptartPresident, I feel a far less complicated solution for you is to just to get Incapacitate States for MV, since it sounds like exactly what you need.

Thank you! I placed the file in the plugins folder where all the other ones are, and turned it on.
Do you know by any random chance how to actually activate the state though? I'm trying to like, create the <incapacitate state> in the States system, but I can't seem to find anything.
@PoptartPresident You need to tag the state with <incapacitate state> in the comment box.
If Victor's plugin doesn't work (by the way, I think you need his core tools as well in order to use it), I have one that does something similar.
You should not have to use a plugin to do this. If it doesn't work without a plugin, then it means you've done something wrong, and you're far better to figure out what that was, otherwise you're likely to have other issues because of the same thing.

You only have one party member? How did you remove the others? Did you delete them in the Actors tab? What about in the Starting Party in the System tab? Of course if you deleted them in the Actors tab, they won't show up in the Starting Party list because they have no names. So go to your Actors tab, put a character name in all the slots, then go back to the System tab and see if you have extras in your Starting Party. If you do, delete them from there, and THEN delete them from the Actors tab.
... Oh right, you have to get Victor's basic module to make all of his scripts work. I forgot about that.

Also Shaz, I'm pretty sure you completely misinterpreted this question. Cause what Poptart is saying is that there's only one party member in the game, period, and they want to make it so when that one person is petrified the battle ends instantly in a game over state.

By default RPG Maker doesn't have that, unless MV introduced new code for this.
You should not have to use a plugin to do this. If it doesn't work without a plugin, then it means you've done something wrong, and you're far better to figure out what that was, otherwise you're likely to have other issues because of the same thing.

You only have one party member? How did you remove the others? Did you delete them in the Actors tab? What about in the Starting Party in the System tab? Of course if you deleted them in the Actors tab, they won't show up in the Starting Party list because they have no names. So go to your Actors tab, put a character name in all the slots, then go back to the System tab and see if you have extras in your Starting Party. If you do, delete them from there, and THEN delete them from the Actors tab.

Oh it's okay! The plugin worked successfully. I added the basic module as instructed by the plugin itself, and now my one party member finally "dies" and the game ends during battle tests. Hurray!

Yeah, you only have 1 party member the whole game. I was easily able to remove them the other 3 "given" by changing the maximum amount of actors to 1. I don't gotta worry about party battling or anything.

... Oh right, you have to get Victor's basic module to make all of his scripts work. I forgot about that.

Also Shaz, I think you completely misinterpreted this question. Cause I'm pretty sure what Poptart is saying is that there's only one party member in the game, period, and they want to make it so when that one person is petrified the battle ends instantly in a game over state.

By default RPG Maker doesn't have that, unless MV introduced something new for that exact kind of thing.

Correct! And it all worked as I had hoped. Thank you very much!
You still need to remove the extra actors from the starting party, before changing the maximum amount to 1.
You still need to remove the extra actors from the starting party, before changing the maximum amount to 1.

Uuuh there's only the one guy there in the starting party in system tab, no worries ^^"
Also Shaz, I'm pretty sure you completely misinterpreted this question. Cause what Poptart is saying is that there's only one party member in the game, period,

And many people who are only starting to use the engine do the wrong thing to make only one party member in the game - they change the Actors tab and not the starting party in the System tab. If they're not removed from the system tab, you still have 4 party members - 3 of them are just blank. And this is why sometimes battles will continue even though the "only" party member is dead - because they're not the "only" party member. Movement on screen, if you have followers enabled, can sometimes be affected, as well as what you see in the menu.

Original thread: https://forums.rpgmakerweb.com/threads/how-do-i-transition-to-the-game-to-game-over-screen.124176/