How to eliminate player controlled movement?

I'd like to remove the players ability to move with the mouse or up/down/left/right keys. Right now I'm doing it with a parallel process and a set move route command. Is there a more elegant way, preferably one that allows the player to interact with events?
You need to give more info before we can help you.


Usually the autorun has the function to block player input, but that blocks all input unless the commands in the autorun specifically call for player input.


But to determine if that is what you need, you'll have to describe the game mechanics of your project - if the player can do nothing, it's a movie and not a game...
The bad news is that you'll probably need to code a bit to do this.  The good news is that it's pretty easy.  You just need to find the method responsible for controlling the player (part of the Player object for sure, and maybe it has a similar name to VX Ace's "move_by_input" method) and then you can do something like tie the ability to move to a Switch.  Below is my method in VX Ace (maybe someone can write the MV code for you) to tie each directional button's "working" to a switch; for example, if Switch 41 is OFF then the player will not be able to move Down.

Code:
#--------------------------------------------------------------------------
  # * Processing of Movement via Input from Directional Buttons
  #--------------------------------------------------------------------------
  alias :move_by_input_if_possible :move_by_input
  def move_by_input
    return if (Input.dir4 == 2 && $game_switches[41] == false)
    return if (Input.dir4 == 8 && $game_switches[42] == false)
    return if (Input.dir4 == 4 && $game_switches[43] == false)
    return if (Input.dir4 == 6 && $game_switches[44] == false)
    move_by_input_if_possible
  end
var move_by_input_if_possible = Game_Player.prototype.moveByInput;
Game_Player.prototype.moveByInput = function() {
if ($gameSwitches.value(x)) {
move_by_input_if_possible.apply(this);
}
};


x is the switch id.
You need to give more info before we can help you.


Usually the autorun has the function to block player input, but that blocks all input unless the commands in the autorun specifically call for player input.


But to determine if that is what you need, you'll have to describe the game mechanics of your project - if the player can do nothing, it's a movie and not a game...



Right! Sorry, I went a bit dumb here. Essentially,  think a "Clicker" game. Normally, the player pressed a button, goes that direction. Instead, I'd like to make it so that whenever a player pressed a button (Up/Down/Left/Right or clicks the screen), it instead won't move them in *that* direction, it'll be handed off to a CommonEvent that will handle movement. So, imagine if you will, a pathway. The CommonEvent, when called, will check a variable, then based on the number returned, will change which direction the player goes. It keeps the player "on rails," if you will. They can't deviate from the given path. So, essentially, I need a way of tossing out the MOVEMENT part of pressing up/down/left/right/clicking, but I still need to be able to access the key presses. I hope that explains a bit better! The 1:12 mark in this video is a somewhat accurate idea, where each "click" is doing damage to the enemy on the screen (in that game, not this project).

The bad news is that you'll probably need to code a bit to do this.  The good news is that it's pretty easy.  You just need to find the method responsible for controlling the player (part of the Player object for sure, and maybe it has a similar name to VX Ace's "move_by_input" method) and then you can do something like tie the ability to move to a Switch.  Below is my method in VX Ace (maybe someone can write the MV code for you) to tie each directional button's "working" to a switch; for example, if Switch 41 is OFF then the player will not be able to move Down.



#--------------------------------------------------------------------------
  # * Processing of Movement via Input from Directional Buttons
  #--------------------------------------------------------------------------
  alias :move_by_input_if_possible :move_by_input
  def move_by_input
    return if (Input.dir4 == 2 && $game_switches[41] == false)
    return if (Input.dir4 == 8 && $game_switches[42] == false)
    return if (Input.dir4 == 4 && $game_switches[43] == false)
    return if (Input.dir4 == 6 && $game_switches[44] == false)
    move_by_input_if_possible
  end



I'll look into this in the morning some more if no one knows of a way to do this. Thank you very much!
you can also use Yanfly's Stop All Movement! http://yanfly.moe/2015/12/01/yep-35-stop-map-movement/ and use it with this~ http://mvplugins.tordamian.com/plugins/mouse-system-ex/
That'll do it! Thank you very much Archeia!
var move_by_input_if_possible = Game_Player.prototype.moveByInput;
Game_Player.prototype.moveByInput = function() {
if ($gameSwitches.value(x)) {
move_by_input_if_possible.apply(this);
}
};


x is the switch id.

It seems that Yanfly's script doesn't allow the player to interact with events, and that's what I need. I need the player to not be able to move via input, but still interact with events.


This works, thank you izyees.
Most of the time I can find a way to use autorun to do what I need, but it would be nice if during an autorun 'set movement route' command if I run the player over or into an event having trigger 'player touch' that it would run that event until completion and then resume remote control after the event finishes. The most common example of this usage would be an introductory scene where the player is controlled via autorun and he/she exits the scene via an exit event.


Currently I've had to hardcode the transfer into the autorun but it'd be nice to leverage the maps existing events where possible. As much as possible I'm avoiding the use of scripts/plugins except where I have no choice or it becomes excessively complicated to implement without scripts, and then I'm mostly inline scripting except when I start to rehash the same scripted command over and over at which point I'll dump it into a custom plugin. At any rate if someone can find a non-scripted solution I would love to hear. Most likely I'll report back in a day or two with my own solution if it is at all possible.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-eliminate-player-controlled-movement.56549/