Walking under the bridge?

A mapping question. I want to make a setup like in this picture (this one is quick and dirty of course).
upload_2019-8-18_13-32-5.png


I would like the player to be able to pass both over and under the bridge. All I can do is either under or over. Not two at the same time. Any tips? 🙂
Make a switch or variable that activates on top of bridge right before going onto bridge. Then have a event in middle of the bridge changing "over hero" or "below hero". Experiment with solutions like this. I have done it many times but not always in the same way.
So you'd duplicate the bridge tiles, once with a star and once with an o and switch between them using the events?

No way to just do it in the tilesets themselves?
I would use events, not tiles, and with this method you can have a bridge as long as you like.
Page one - graphic bridge, set to 'Above Characters'
Page 2 - conditioned by Switch #x being ON, graphic bridge, set to 'Below Characters'.

Event activating the bridge (trigger Player Touch) turns Switch #x ON, event turning off the bridge turns Switch #x OFF.

How would you know whether you need it turned on or off? Not a problem because of the next issue. Supposing the player changes their mind and in fact doesn't cross the bridge but turns back. You've now got the switch ON so the player cannot go under. To deal with that, I have a separate event one tile further away from the bridge which turns the switch OFF. This also deals with the player crossing the bridge.
Spoiler
Sprite-0001.png
You need a switch, e. g. UP - when the player is supposed to walk on the bridge, it will be ON.
1. black event - when player touches it, switch UP changes to ON
2. yellow event - when player touches it, switch UP turns OFF
this way you know whether the player is on the cliff or under the cliff

3. pink events - two pages, the first one - priority set to above, the tile graphics is the part of the bridge, the second page when switch UP is ON - same graphics, priority set to below
4. red events - two pages, first one -priority set to below, blank graphics, second page when switch UP is ON - priority set to same as character, blank graphics

ignore blue tiles, didn't need them in the end, only if you needed some other events except player to use this bridge
No need to duplicate tiles, just make events with bridge tile and have above hero. This will make you go under the bridge.
And when stepping on to the bridge from above you change the bridge events to "under/below hero"
Hah, never thought of using the priority option like that and never even noticed it has an "Above" option. This changes EVERYTHING 😀

Thank you everyone! Especially @mishakoc for the extra mile and exhaustive tutorial! Now the level I want to build can be much more interesting.

Cheers!
If your query is fully resolved, please Report your post and ask for the thread to be closed. Mods might not see a post, but they will see a Report.
or if its a free game, you can use Ocram Passages plugin, but if you go commercial, I wont recommend this one because its
exspensive one for a license.
Thread closed IgnoreMe

Original thread: https://forums.rpgmakerweb.com/threads/walking-under-the-bridge.112307/