Script function to stop event movement until player moves two blocks?

Hi guys, I'm just using the roguelike movement script by MeowFace (http://forums.rpgmakerweb.com/index.php?/topic/44421-rogue-like-movement-chase-mode-surprise-attack/)

It works fantastically, however after enemy encounter, I want to give the player the ability to choose to fight or run away and then the event waits until the player is a certain distance away. Not sure if this is in the right area but any help would be great.
You can use a switch for that.

When setting up the event battle, tick allow escape. And you should get a conditional branch for escaping. 

In the escape conditional branch, set it to turn on self switch A/B/C/D

Set up a new page in the event and set the page condition to self switch A/B/C/D

In that page, set it to run as parallel, then simply put wait (time you want it to wait) then turn off the self switch.

This way when you escape the event should do nothing and wait there for awhile. You can even set that page to "through" so your player can walk through the even during that wait period.

Original thread: https://forums.rpgmakerweb.com/threads/script-function-to-stop-event-movement-until-player-moves-two-blocks.51874/