Directional tiles not working properly with region restrictions

Hi!

I have a fully parallax game with a map that has a horizontal fence on it. I'm using Yanfly region restrictions to permit movement on the maps (though I suspect this question is more about tilesets than plugins, so I posted here!)

I know that I should be able to use directional tiles to prevent the player from crossing over the fence. However, I can't get it to work right.

I set up two different directional tiles, one which prevents down mvmt and one which prevents up. I lined them up in the proper place, but found they weren't working -- the player could still pass up or down.

With some testing, it turned out that the region restrictions seemed to be overriding the directional tiles.

So I erased the player-passable region tiles on the directional tiles. But then, for some reason I couldn't pass from the region tiles onto the directional tiles! Here's the test I put together:

2024-04-04 23_56_53-NHNT - RPG Maker MV.png


I can walk on all the 6 tiles, but can't pass through onto the test directional tiles.

If I load the player directly ONTO the directional tiles, they work as intended and I can walk left or right on them. But once I step off onto the region tiles, I can't step back on.

I can't tell where the problem really is, or what I can do to troubleshoot any further. Anyone have any thoughts?

Thank you!!!!
there are several other things that might interfere as well.

please post a screenshot of the tileset that you are using for the directional settings, with the tiles used marked (screenshot of the database definition and configuration, not the tilesheets
please post a screenshot of the tileset that you are using for the directional settings
I don't think this will be needed - this is exactly what would happen if OP configured them correctly.

From reading the code, the way those regions work is that, whenever the player tries to move:
- If the region they want to move into is from the blocked list, they can't.
- Otherwise, if the region they want to move into is from the allowed list, they can.
- Otherwise, it checks regular engine's collisions.

So walking into an allowed region is always allowed, but walking away from it is only allowed when regular rules would allow it. And in your case they don't - the tiles next to the fence allow passage, but the others don't, so you can't move between them.

The solution would be to put regular passable tiles where the 6 regions are next to the fence area (you could make them invisible if they'd interfere with the parallax).
The solution would be to put regular passable tiles where the 6 regions are next to the fence area (you could make them invisible if they'd interfere with the parallax).

Highly interesting, appreciate the thorough explanation of what's happening here.

Works!
This thread is being closed due to being reported as solved. If you need it reopened, report it to let us know why. Thank you!

Original thread: https://forums.rpgmakerweb.com/threads/directional-tiles-not-working-properly-with-region-restrictions.167501/