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