Make an event appear above another

Hi all.

I basically have multiple bridge events that are triggered to appear above/below a character based on where they are. This is all fine and well, until you want an enemy to patrol on the bridge.

Having 2 events appearing 'above character' doesn't seem to work, the patrolling event will either walk under the bridge tiles, or will glitch under and walk above them as it progresses through each tile.

Is there a way to force an event to appear above all other events, either via plugin or script?

Essentially, I need 1 'above player' event, to appear above another 'above player' event. I don't want to use a bridge plugin ideally.

edit: sorry if this is in the wrong place. I was looking for an MZ specific area so any plugin/script recommendations would also be for MZ.

Many thanks!
Add your patrolling event after the bridge events. If you have two events occupying the same tile, the one with the higher event id will be shown "on top".
Add your patrolling event after the bridge events. If you have two events occupying the same tile, the one with the higher event id will be shown "on top".

So the bridge events are 038,39,40 etc, and the patrol is 238, so this should be displayed above the bridge, except it isn't. For each bridge tile, it starts underneath and then moves to above the tile, so it's a very glitchy walk, see below image. It kinda pops up from beneath the bridge tile, then when it gets to the next one, it starts underneath again.
skeleton2.png


Event layout image:

event layout.png


When the player goes up to the skeletons level, it all works fine as the bridge tiles are switched to 'beneath player', its just when both skeleton and bridge are 'above player' that it glitches out.
The events that create the bridge don't need to be there, you can simply draw the bridge using the Automatic layer.

I created events for you that you can place on the left, and right sides of the bridge. The events will allow the player to pass underneath the bridge. Set the priority to Below Characters, and the trigger to Player Touch. You can create another event, and set the priority to the Same as Characters, and place this where you don't want the player to pass through when they're underneath the bridge i.e. the wall. 🙂

Spoiler
Hi there.

Unfortunately these don't work, the player is unable to pass using the above conditionals. Setting them to 'same as player' will trigger the events, but the player does not trigger them turning back off again coming out, and stays invisible with through turned on. This seems relatively easy to fix, however. The issue is however, that the player is invisible before they even go under the tile, and this is very noticeable in this case. In addition, it gets somewhat further complicated when the player comes out from the bridge area diagonally, or when they touch a wall that has to trigger the 'Through' movement to Off, to prevent them from going there, and then somehow turning it back on again if they go back.

Additionally, because of how the auto tiles work, the bridge platform then becomes too wide and looks silly, which is the reason why new tiles were made to rectify this. Unfortunately, the only way so far to have the bridges functional is to use them as events, or use a bridge specific plugin, which isn't what I want to do.

Generally, it's not a problem until another event needs to pass over the top of it regardless of player position, as is the case here.

If the event ID priority isn't working as intended like Shaz wrote, then I'm out of ideas on this one sadly.

Not sure if there is a script or plugin that exists that will force an event to always appear above any others, I couldn't find anything when looking. If there is a 'force above all others' plugin, that would actually be pretty handy, I can see that being used in multiple areas where this issue also crops up (not just on bridges! lol)
To update;

This was resolved with the following script command by Godarkhaos. So a massive thanks to them for giving me a resolution to this.

$gameMap.event(this._eventId)._priorityType = x

Replace x with a number higher than 2.

From a quick test, it looks like it is stackable, ie, 4 will go over a 3.
I'm not sure what kind of other events you have going on in your project that may have been affecting the one I made for you. 😕

Original thread: https://forums.rpgmakerweb.com/threads/make-an-event-appear-above-another.134114/