Movement Direction Lock


This plugin allows you to restrict player movement temporarily using events.

By default, they can move in all four, or eight, directions. By using certain plugin commands, you can “lock” certain directions if you didn’t want to allow them to move in those directions.


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_MovementDirectionLock plugin.

Once it is in your list of plugins, turn the plugin on.


Here are some direction names that you can use:

- UP

To lock a movement direction, use the plugin command

lock_move_dir DIR1 DIR2 DIR3 ...

To unlock a movement direction, use the plugin command

unlock_move_dir DIR1 DIR2 DIR3

For convenience, you can lock multiple directions in one command.

So for example, if you wanted to prevent players from moving up or down, you can write

lock_move_dir UP DOWN

And afterwards, you can unlock those directions with

unlock_move_dir UP DOWN

You may also like...

29 Responses

  1. I am actually thankful to the holder of this site who has
    shared this fantastic post at at this time. Fußballtrikots Für Kinder

  2. Anonymous says:

    Does this plugin still work? When I try to activate it my character just won’t move at all.

  3. Anonymous says:

    This script is nice… but it doesn’t seem to respect mouse control.
    Is there a solution to this?

  4. Arthur says:

    Hi, i have one problem, if i use some one diagonal movement script, your script don’t work and i can move, I tried everything but it still did not work.

  5. nick says:

    Hello this is a really cool script and I thank you for it. Have one question though, the character sprites sit a few pixels above the tiles, how do I get them so they are positioned directly on the tile? Like in the screen shot on this page.

  6. Nev says:

    Hi, thanks for making this plugin. It’s just what I needed, but I’m having a small problem. I’ve tested and it doesn’t seem to restrict movement with mouse/touch? Maybe I’m doing something wrong. To be sure I did a parallel event that restricts all movement, and sure enough I can’t move in any direction with the keyboard but the character still is able to move wherever I click with the mouse.

    • Hime says:

      Yes, it does not restrict mouse input, which is a bug.
      However, if I implement logic to restrict mouse, it would also prevent things like move routes.

      I’m not sure if that would be expected.

  7. Fatalys93 says:

    This plugin works well only if you use also a plugin that allow diagonal movement.
    Otherwise, if you move in a diagonal route this happen:

    Also in new project 🙂

  8. Michael says:

    Hey Hime, thank you for this, it is exactly what I need. Or, at least, most of it. Would it be possible to add locking for the menu and dash inputs as well? Yes, it could be disabled using map settings, but what if you wanted to temporarily block input during specific events on the map?

  9. Kloe says:

    Oh,ok thank you! I guess that makes sence now that I think about it… If it was only button press then it would be harder to do things like the sideview overworld thing in some of your msg plugin screenshots!

  10. Kloe says:

    Is it possible to get this to work like the direction lock script for VX ACE where you could hold a button to lock it?

    • Hime says:

      This plugin was designed to activate when a command issued. If I changed it so that it activated on button press, it wouldn’t be as versatile. I would recommend looking for a plugin that executes commands when a button is pressed and released.

Leave a Reply

Your email address will not be published. Required fields are marked *