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 - DOWN - LEFT - RIGHT - UPLEFT - UPRIGHT - DOWNLEFT - DOWNRIGHT
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
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
Does this plugin still work? When I try to activate it my character just won’t move at all.
This script is nice… but it doesn’t seem to respect mouse control.
Is there a solution to this?
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.
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.
Add a ! to the filename. eg rename “Actor1” to “!Actor1”
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.
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.
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 🙂
it deletes the image: go here to see the problem http://imgur.com/lQW4MRv
What is happening in the image? It looks like half the person is cut off
See this demo to understand the problem 🙂
Anyway, thanks for plugin Hime, it’s very useful!
I’ve updated the plugin so that it uses whatever movement system you have in your project.
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?
On the third page of the event editor there is a “change menu access” you can use to block the menu.
For dashing, I wrote a plugin that allows you to enable or disable dashing for the player. You can get it here: http://himeworks.com/2016/01/disable-dashing/
Thank you so much! That’s perfect. 🙂
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!
This might be what you’re looking for
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?
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.