In RPG Maker, when you move your character around, they will face that direction while they are moving. For example, if you move up, they will face up. If you move left, they will face left.
With this plugin, you can set it up so that when the player holds down a specific button, the character will not change directions while moving. This allows you to create strafing movement, where you move side to side while facing forward.
There can be other mechanics involved where the direction that you face may be important.
Plugin: download here (right-click, save-as)
Download ths plugin and place it in the “plugins” folder in your project’s “js” folder. Then open your Plugin Manager (F10), double-click an empty row, and select the HIME_LockFacingDirection plugin.
Once it is in your list of plugins, turn the plugin on.
In the plugin parameters, type in the name of the button for the “Lock Button”.
The actual name of the button will depend on what input plugins you’re using.
If you’re using the default input system (ie: no input plugins), you have the following buttons to work with. I’ve included the keys on your keyboard that map to them.
shift - any "shift" keys control - any "ctrl" or "alt" keys ok - "z", "enter", "space" escape - "x", "esc", "insert" pageup - "q", "pgup" pagedown - "w", "pgdown" left - left arrow, numpad 4 up - up arrow, numpad 8 right - right arrow, numpad 6 down - down arrow, numpad 2
So for example, if you use the `shift` button (without quotes), then when the player holds down shift, their character direction will be fixed.
If you are using a custom input system, you will need to consult the instructions provided by that plugin to get the names of the buttons you have to work with.
This plugin should work with both gamepads and keyboards. It currently does not support mouse-only or touch-only systems.