[MZ] Phileas's Player Immobilizer (MZ player movement manager/controller)

Plugin name: Phileas's Player Immobilizer

Author: Phileas

Version: 1.2.0 for MZ

Release date:
1.0.0 - 21.June.2023
1.1.0 - 25.June.2023
1.1.1 - 30.June.2023
1.2.0 - 13.August.2023

Plugin description:
Allows you to prohibit the movement of the player's charact.
Usage example: A mini-game that uses arrows or a pointer, during which the player character must not move.
The plugin only blocks movement through input. Even with the switch on, you can specify a route via the events command.

You can control the movement through the switch that is set in the plugin parameters, or through the plugin command. As you prefer. The player's movement will be blocked if at least one thing is enabled.

Using the plugin:
The only parameter is the switch. When it is turned on, the player cannot move.

How it looks like:
2023-08-13_16-18-14.png


Code

License

This plugin is released under MIT license.
This means that you can freely use the plugin in non-commercial and commercial games and even edit it.
But be sure to include me in the credits!

Compatibility:
It has been verified that the plugin is compatible with rmmz_movement from gsioteam (pixel movement in 8 sides). If there are any problems, write to me.
I downloaded your plugins from yandex and it set off Windows Defender, which labeled them as "severe" threats and removed them. Is there a reason for this?
I downloaded your plugins from yandex and it set off Windows Defender, which labeled them as "severe" threats and removed them. Is there a reason for this?

This probably happened because of the file extension - .js.
If you don't want to disable the antivirus or make an exception for it, try copying the code from under the spoiler. It is the same as in the file.

For the sake of experiment, you can try to download this file:
here
This is the same file, but with the .txt extension. But to use it in the project, you need to change the file extension to .js.
Updated to version 1.1.0!

Now you can control the movement through the switch that is set in the plugin parameters, or through the plugin command. As you prefer. The player's movement will be blocked if at least one thing is enabled.

Check out the first post in this thread.
Updated to version 1.1.1.

Fixed an annoying bug of the plugin command. I checked, now everything works as it should.
See the first message of the topic.
Update to version 1.2.0!
  • Added a state saving parameter. If it is enabled, the movement state will be restored when the save is loaded.
  • The movement state is reset when starting a new game.
The plugin is obsolete, moved the functionality to Phileas's Movement Controller.

Original thread: https://forums.rpgmakerweb.com/threads/mz-phileass-player-immobilizer-mz-player-movement-manager-controller.158533/