Script to disable movement for player?

I'm having a rather complicated sequence of events that can't work with Autoruns so have to stay as Parallel events.
The only issue is that the player can still walk around during it, which they're not supposed to. I found that there was a script call to disable and enable movement for MV in this thread: https://forums.rpgmakerweb.com/index.php?threads/block-player-movement.74387/post-700242
However, that doesn't seem to work for MZ. Does anyone know what the MZ equivalent for disabling and enabling movement are?
The MZ function is exactly the same.

It's very likely that you should be able to implement what you want using an Autorun event to drive it, but that code should work fine.
What if you activate an empty Autorun incl. a wait as long as your Parallel processes are doing their thing?
Or give the player a repeating empty move route to lock them in place, then give them a non-repeating empty move route to let them move again.
a rather complicated sequence of events that can't work with Autoruns
I'm wondering about that - the usual way to guarantee a sequence is to have one controling event that remote-controls all other events. and in that case your controlling event can easily become an autorun without causing any problems to any other event as the remote-controlled events are all empty of content and on action button.
since you are controlling the scene, you can do one of these methods:
1) Before scene set Movement Route : Player (Repeat), after scene set Movement Route : Player, to release the player

2) Script call before scene:
if($gamePlayer.moveByInputCached === undefined)
$gamePlayer.moveByInputCached = $gamePlayer.moveByInput;
$gamePlayer.moveByInput = function(){return false;}

Script call after scene to release:
$gamePlayer.moveByInput = $gamePlayer.moveByInputCached;

3) grab one of the disable movement plugins
1734878766559.png

To explain @caethyril's method, here's a screenshot.

​

That method doesn't stop you opening the menu though, does it?
No it doesn't.
Just slap a Disable Menu Access command in there then.

Original thread: https://forums.rpgmakerweb.com/threads/script-to-disable-movement-for-player.174046/