What's the z value for an event set to be 'above player'?

So, I've got a scenario that's causing an issue: a hidden passage behind a bookcase.

1615595455354.png


(I'm using image offsets to fit the case where it needs to be in game)

I'm using parallax mapping with Cyclone Maps and I'm running into an issue here. This is part of a cutscene where a switch is triggered, the bookshelf moves to one side (just a movement route command), revealing the door behind it. Then the player (via movement route command) walks through the passage which leads to a secret room.

Since the player will be walking 'under' the wall, it's on the par layer (z20), but the problem is that it overlaps with the area the bookshelf covers by necessity, meaning that in game, the par layer appears over the bookshelf's character sprite.

1615596935167.png


I tried setting the bookcase to above the player, but that still seems to be below the par layer. I can change the par layer's z value, but I don't know the z value for a character sprite above the player.
Does your bookshelf have a star passage setting on the top half?
The bookshelf is actually a character sprite, since it needs to move to the side in order to reveal the passage beneath. The rest of the map is done via parallax mapping.
Events are typically displayed 6 pixels higher on their tile. Starting the filename with ! should eliminate that.
How have you got the parallax layers set up? The bookshelf on the left looks fine.

I'd probably completely rethink the approach. Use another event for the exit rather than a parallax layer set to 'above characters'.

@oriongates I don't think that is the issue - the bookshelf is displaying where it needs to be, but the door behind it, because it's using a parallax layer that shows above the character, it's also showing above the bookshelf, cutting off the corners.
I use Galv's layer plugin for my parallaxes, but assuming the z value is the same, 5 is above everything and I could get my events to appear above z layer 4 and still have the player appear underneath it. See if that works!
Events are typically displayed 6 pixels higher on their tile. Starting the filename with ! should eliminate that.

That's not the issue here, I'm afraid. All the events are appearing where they should on the map. The issue is getting the event to appear above the parallax layer.

How have you got the parallax layers set up? The bookshelf on the left looks fine.

I'd probably completely rethink the approach. Use another event for the exit rather than a parallax layer set to 'above characters'.

The map itself is a png, displayed using the default "Parallax Background" option under map properties. The left bookshelf and the dark part of the secret door are part of that png.

The tile layers are all blank, so almost everything appears below the player sprite, but since this map is used only for a cutscene, that doesn't matter: the player won't be in control so they simply won't be stepping anywhere they shouldn't.

The right bookshelf is an event, in order to make it movable.

Th <par> layer provided by the Cyclone map plugin (z layer 20) consists only of a 48 pixel wide strip which is the portion that needs to appear above the player.

View attachment 182743

In theory, I could make this an event, but since I need the bookshelf to appear above it and I need the exit to appear above the player (whose level cannot be changed), I only have the option to set both the bookshelf and the exit on the same layer ("above the player") or the exit and the player on the same layer ("same as the player"). Is there a way to determine what appears on top of what when both events are on the same layer?


I use Galv's layer plugin for my parallaxes, but assuming the z value is the same, 5 is above everything and I could get my events to appear above z layer 4 and still have the player appear underneath it. See if that works!

Hmm, so it sounds like the player is z layer 3 and the "above player" is z level 4. I'll test it but it sounds like that may put me in the same place as above, having to share a level with one or the other.
From my experience the event with the higher event id will appear on top.

I would create the doorway as an event with 2 pages. Both pages would have the same sprite. The first would be set to Below Characters and the second would be set to Above Characters. A switch conditions the second page.

Add a parallel process event that uses Set Event Location to move the bookcase onto the same tile, then does an Erase Event command.

Your event that controls the cutscene would then do a Move route to move the bookshelf, and AFTER it's finished moving, turn on the switch to activate the second page of the doorway sprite. Then make the player move into it, and they should be obscured by the top of the doorway as they enter.
From my experience the event with the higher event id will appear on top.

This basically solved the problem by itself. I just created an event version of the arch and made sure its ID was lower than the bookshelf. Seems to work now.

Original thread: https://forums.rpgmakerweb.com/threads/whats-the-z-value-for-an-event-set-to-be-above-player.134360/