How to stop a game-over screen from erasing variables?

That's interesting that you used three npcs...

I JUST REALIZED HOW I'M GONNA DO IT!

My boss is a skeleton,(NO NOT LIKE UNDERTALE!) (Also will not actually be in the game) but there's a pile of bones next to the skeleton that the character freaks out about, and the skeleton next to it doesn't appear until... Wait... A dead skeleton... Next to a live skeleton... The live skeleton knows your abilities... Papyrus... Sans... Sh*t. Maybe it is like undertale...... Whatever! This won't even be in the game anyway, it's just a test battle so I'm just gonna leave it as is~ Anyway, once you look at the pile of bones and read some text about the character getting freaked out, I set the pile of bones to increase the variable by 1, making the other skeleton appear and autorun an event...

I couldn't get around how to make it to where the skeleton wouldn't automatically fight you, and just making the pile of bones next to it increase the variable each time wouldn't work.. I just...- I figured it out though!

All I need to do is have two variables, and have an event page on the second live skeleton that shows no graphic and requires the first variable to be 1 or higher, and the second variable to be 1 or higher. This will allow the first variable to be any number it needs to be, as long as the second variable is set to 1, the skeleton won't show up, and I don't have to change the first variable! Now, whenever you lose the battle, that variable is set to 1 again, and when talking to the pile of bones, it's put back at 0! Once it's put back at 0, the skeleton will get out of the blank event page and go the event page with which the number the first variable is set at! Now, all I need is multiple pages from the pile of bones, increasing the first variable for losses by 1 each time you talk to it again... Now would I need multiple event pages, or just one?... Hmm... I think I'd only need one, as it gets the job done anyway, such as increasing the first variable by 1 each time, and decreasing the second variable by 1 as well... Or... Increasing the second?... I'll work that out later, but this is great! I actually think this could work.

With the line of code you gave me anyway 😀

Sadly, I'm not home right now, so I'll have to test this out later and update y'all then~

........................................

Fml they only allow one variable per event.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-stop-a-game-over-screen-from-erasing-variables.87702/