MV Custom Escape Event?

I'm trying to make a custom Escape skill that, upon use, teleports the player to the starting area and removes a percentage of their gold and MP.

1759082283843.png

I've made an Escape skill that has the Escape effect and is linked to a Common Event,
1759082345212.png

And it kinda works - but the common event doesn't play. I've tried removing the Special Effect: Escape, which has the Common Event play, but the battle doesn't end and the player isn't teleported. The battle just freezes and the game gets stuck.

I had everything working the other day, but I've made a lot of progress in other parts of the game and haven't playtested this specific mechanic in a while - and now it isn't working. The only thing I can think of that could have caused this is that I added a plugin to change my game over scenario, and either the load order got messed up or the plugin itself is causing the error.
1759082788367.png

Does anyone know how I can get this working again?
your problem is that the battlescreen and the map use two different interpreters, and a common event called on the battlescreen cannot easily continue after battle.
you'll need to give the order for the common event to be processed only after battle.

however there is a trick to do that:
make a parallel common event conditioned to a switch "after escape".
In that common event you do everything you want done after battle on the map screen
and the very last command in the common event would be "control switch 'after escape' OFF" to prevent the CE from repeating.

then in your battleskill you call a common event that simply turns the switch ON.
You could use the same for other effects, it doesn't matter when in battle the switch is turned on - because there are no parallels working on the battlescreen, the parallel CE cannot work during battle, only after battle when the player is back on the map.
your problem is that the battlescreen and the map use two different interpreters, and a common event called on the battlescreen cannot easily continue after battle.
you'll need to give the order for the common event to be processed only after battle.

however there is a trick to do that:
make a parallel common event conditioned to a switch "after escape".
In that common event you do everything you want done after battle on the map screen
and the very last command in the common event would be "control switch 'after escape' OFF" to prevent the CE from repeating.

then in your battleskill you call a common event that simply turns the switch ON.
You could use the same for other effects, it doesn't matter when in battle the switch is turned on - because there are no parallels working on the battlescreen, the parallel CE cannot work during battle, only after battle when the player is back on the map.
I tried doing that, and I still had the same problem. The battle just ends and the common event doesn't play.

The version I did before was working for a long time until I added the plugin, and I don't know what broke it.

The plugin I added was "Kath_GameOver", and I used it to make it so that upon player death you respawn at base camp and lose half your gold by running a Common Event upon Game Over screen.

Thank you for taking the time to respond!

Edit: I just remembered, it broke after I added the MessageCore plugin. Could it be related?
please show screenshots of both common events and the skill, then I can check if there are any mistakes there.
I tried doing that, and I still had the same problem. The battle just ends and the common event doesn't play.

The version I did before was working for a long time until I added the plugin, and I don't know what broke it.

The plugin I added was "Kath_GameOver", and I used it to make it so that upon player death you respawn at base camp and lose half your gold by running a Common Event upon Game Over screen.

Thank you for taking the time to respond!

Edit: I just remembered, it broke after I added the MessageCore plugin. Could it be related?
If it was working before, and adding a plugin broke it, try turning off your plugins one by one until it works again, so you can narrow down what might be breaking it.
please show screenshots of both common events and the skill, then I can check if there are any mistakes there.
1759259857408.png

1759259884971.png

1759259906082.png
I gave it a quick test and it seems that just Yanfly Battle Core makes it not run the common event. But Yanfly has a plugin "Utility Common Events" where you can use a common event after escaping.
Hi, this can be done without a plugin; you just need two common events and one "switch."

Create a common event, "EscapeBattle."
This common event is triggered by using your skill. This event "will only do two" things:
1. "End the battle" (this option is in tab 3 of the event editor, at the end of the battle segment)
2. followed by an "Escaping" switch - ON.

Then create a second common event, "RealEscape," which has the "Escaping" switch as its automatic condition.

In this "RealEscape" common event, Here you must add the common event functions, and you must turn the "Escaping" switch OFF, or it will generate an infinite loop.

Oh, and you should also add transitions, screen tinting, and blocking access to the menu so as not to break the immersion when "Ending the Battle" ends.

Original thread: https://forums.rpgmakerweb.com/threads/custom-escape-event.180338/