When I have a vertical fence I want the player to be able to move up and down but not left and right through it. This can be set in the tileset passage (4 dir).
But what if I have an event with a fence instead (because I needed a layer on top of the 'B-layer')? I can set it to block or through but nothing else? Where is the option in the event to make it block specific directions only?
I always thought that events with tiles get treated as if they were just tiles. However there IS a line in the Game_CharacterBase.passable? method that checks if there is an event on the next tile, and won't let you go there if there is. So I find it a bit confusing myself.
You would probably need a script mod if you want the passage check to see if an event is based on a tile, and to use the tile's passage settings.
I take it your fence with 4Dir passage settings is not the one that uses the autotile? Those are either on or off - you can't really set directional passability for most of them.
No it's not an auto-tile.
Okay so I need a script...
Moving to RGSS3 Script Requests
Are you using any other scripts that modify passage checking?
If you're not sure, do a global search (control+shift+f) for this:
def passable?and see what comes up. The only results SHOULD be Game_Map and Game_CharacterBase.
If others come up, you'll need to list them and provide links to the original script.
Only those 2 come up. No other script overwrites/aliases it.
Alright - I'll see if I can have a play with it tonight and get something for you.
I tried setting a B tile to have a passage of up/down only and used an event to show it and it works like how the normal tile would...
I even lined them up and they work...
PS: The event setting is normal, it doesn't even have through
Oh of course. Changing it to "below characters" then applies the A to E tile directions again. Even with "through" checked. I thought I tried that but apparently not. Thanks.
It would still be nice though to have events change the 4-direction passage as well. Sometimes they need to override it. Like when I have a fully filled tileset but I still need to add another fence (by using an event to basically 'cheat' another graphics layer onto the map). I then have no real option to change the 4-passage to match the fence displayed by the event.