Keeping an NPC in an Area

Hello! So what I'm trying to do is to keep a group of NPCs (in this case Butterflies) in a confined area of the map but I don't want them to impede the player so I have Through On. At first, I tried the YanFly Movement Restrictions Plugin but since that doesn't restrict with Through On it doesn't quite have the effect I want.

In short, is there a way to restrict NPC movement to a confined area while Thorugh is On?
Wrong place to post - "Tutorials" is for releasing tutorials you have written to help other users.

I'll go ahead and move this to RPG Maker MV Support based on your profile. If you were asking about a different Maker, report this post and let us know which one so we can move this topic to the right place.

I believe that one solution you could use is to give the Butterflies a priority of "Above Player", and also create invisible events to "blockade" them into a certain area that also have a priority of "Above Player". Since the Priority is now different from the player, I THINK you can get away with keep the "Through" property OFF. But I'm not 100% sure.
I believe that one solution you could use is to give the Butterflies a priority of "Above Player", and also create invisible events to "blockade" them into a certain area that also have a priority of "Above Player". Since the Priority is now different from the player, I THINK you can get away with keep the "Through" property OFF. But I'm not 100% sure.
Yes, that worked! Thank you!! <3
Thank you for asking this and thanks to Wavelength for what to try!

I've had the same issue trying to add butterflies in one of my towns. My problem was trying to find a way for them to fly over fences without letting other NPC's do so. I ended up just settling for them staying in a garden but might have to add more butterflies to my project now. 😉


SockYeti said:
Yes, that worked! Thank you!! <3
WAHOO!!!
Very glad it worked!! It's worth remembering (@Quexp) that adding a lot of events, even invisible ones, to maps can cause considerable lag (especially in MV which is poorly optimized compared to most other RPGM engines), since the engine thinks it needs to check the Page Conditions for these decorative/invisible events every frame. So while 25-50 events on a map is perfectly safe and even 50-100 usually isn't that bad, don't get carried away. 🙂
@Wavelength - Good to know; thank you! 🙂

Original thread: https://forums.rpgmakerweb.com/threads/keeping-an-npc-in-an-area.134138/