Standing on an event, but drawn under it?

This video demonstrates two different types of gate behaviors.


Both gates require you to trigger them to open them.


However, you can see that the first gate stops you from stepping on to the the tile where the event is placed, whereas the second gate allows you to stand on the same tile where the gate is, except the player's sprite is drawn under the gate so it looks like you're behind it.


This was accomplished using scripts, but I'm wondering if this type of visual effect be done using only events?
Using move event to stack events over each other could probably achieve it with eventing method. However eventing method is more clumsy than to just script it (I'm assuming.)
You can do it with events. You just have to get the right combinations of "above player" and throughs and the animation for the doors opening.
I thought of above character or through, but then the player would just go right through the gate without having to open it.


I can use an extra event to block the path, which is OK...but if you have multiple gates that starts to not work out very well.
I did a little run through in sample project. It's not perfect, it's not ideally suited to this type of door. If I were really putting the time into implementing into a game, I'd polish it a bit more. But it works. The switch for the door is turned on in a player touch event just above the door. There are others ways you could go about turning it on as well.

doorpg1.png

doorpg2.png

doorpg3.png

Original thread: https://forums.rpgmakerweb.com/threads/standing-on-an-event-but-drawn-under-it.35987/