public

Rpg Maker Developers Group

Simple enough for a child, powerful enough for a developer

2 Followers

MZLyra's "Out Of My Way!" (NPCs can push & shove the player)

BMM Archive · July 15, 2026

Preserved forum archive. This topic stores the original first post and locally mirrored RPG Maker Web attachments when available. It is posted by the BMMPlay archive account, not by the original creator.

Original Source

  • Original title: Lyra's "Out Of My Way!" (NPCs can push & shove the player)
  • Original author: LyraVultur
  • Original date: July 25, 2022
  • Source thread: https://forums.rpgmakerweb.com/threads/lyras-out-of-my-way-npcs-can-push-shove-the-player.149788/
  • Source forum path: Game Development Engines > RPG Maker Javascript Plugins > JS Plugin Releases (RMMZ)

Summary

Out Of My Way! { "lightbox_close": "Close", "lightbox_next": "Next",

Archived First Post

Out Of My Way!
excuseme.png
Ever had your NPCs on a nice custom move route, but then the player just stands in the way and screws up your whole perfectly-timed scene? Want a solution other than freezing the player? Why not let the NPCs push the player around! You could do it with a lot of eventing and by setting their trigger to "Player Touch", but then they wouldn't be able to also have normal dialogue interactions, so I came up with this plugin to help.

How to Use
Add the .js file to your project's js/plugin folder, then open up the plugin manager in the editor and add the plugin.
There's general help to the left side and specific settings help if you double-click on them.
There are settings to set a Common Event to trigger when the different types of forced movement happen.
There are settings to toggle "safe mode" for the different types of forced movement. Safe mode will prevent that movement if there are any events in the square the player would be moved into, even ones with Through ON. Useful to not get swapped into invisible triggers.

Once you've added the plugin, simply add any of these tags to an event's note box:
  • <swapPlayer> If the event wants to enter the player's space, will attempt to swap places with them in order to keep moving.
  • <pushPlayer> If the event wants to enter the player's space, will attempt to move the player one step forward in the direction the player is facing. Only triggers if the player is NOT facing the event, so you can still stop them and talk to them easily.
  • <shovePlayer> If the event wants to enter the player's space, will attempt to push the player one step forward in the direction that the event is facing.
  • <movePlayer> If the event wants to enter the player's space, it will attempt to swap, push, then shove in that order.
  • <rudeMovePlayer> If the event wants to enter the player's space, it will attempt to push then shove in that order. It will never swap.
You can also add one or more of these tags in addition to one above to modify the behaviour:
  • <mustFace> Make the event only able to move the player when the event is facing them (will stop move routes that are trying to turn a corner).
  • <politeMove> Prevents swaps or shoves if the player is facing the event (push already works like this). Useful for NPCs that you need to talk to.
  • <dashOnly> Will make the swap/push/shove only happen if the player is dashing and the event walks into the player.
  • <walkOnly> Will make the swap/push/shove only happen if the player is NOT dashing and the event walks into the player.
  • <dashPlyForce> Will force the swap/shove to happen if the player dashes into the event.
  • <dashPlyPass> The event won't block collisions if the player is dashing.
Example video of swap and shove
Example video of push
(the "Excuse me!" text is from a common event calling thisplugin)

Note to VisuStella Users
If you use VisuStella's Events and Movement Core and give an event a Move Route Custom Command that involves heavy pathfinding (such as Move To: x, y) then you may sometimes get strange results where you are getting pushed from nowhere. Try adding the <mustFace> tag to help alleviate this. Due to VisuStella being obfuscated, there is little I can do to mitigate this.

Performance Notes
This adds extra calculations to RPG Maker's default pathfinding, so it may contribute to lag on very large maps with lots of events.
This will only work with orthoganal movement and doesn't take into account diagonals. Diagonals would be even more expensive to calculate!

Terms of Use
You can view the license here. In short, it is free for commercial or non-commercial use. Credit is optional as long as you don't claim it as your own work.

Downloads
You can download just the plugin here. Press the 'Raw' button then Ctrl+S to save it.

Downloads / Referenced Files

Log in to download

Log in, then follow the RPG Maker Developers Group to see these download links.

Log in to download

License / Terms Note

Terms of Use You can view the license here. In short, it is free for commercial or non-commercial use. Credit is optional as long as you don't claim it as your own work. Downloads You can download just the plugin here. Press the 'Raw' button then Ctrl+S to save it.

Creator Claims / Removal

If you are the original creator and want this listing reassigned, edited, or removed, join BMMPlay and contact the moderators with proof that matches the original RPG Maker Web profile, linked GitHub, itch.io page, or another public creator identity.

#039#rmmz#plugin-archive

Replies (0)

No replies yet.

0 replies 1 view

Log in to reply.

User Avatar