Tile layering with autonomous characters + player

Hey guys, noobish question here as usual lol

How do I make a character (shopkeeper, prisoner etc) behind a certain tile so it overlays them, but me be in front of it if im next to the same tile?

For example, I see people behind some prison bars, and I want to walk up to them to speak through the bars, so the bars are overlaying them but not me so im in front of the bars and other character, hows that achieved? :|

Or a shopkeeper behind a counter with objects overlaying them, but not me if I walk up to the same tile.

So far I ended up getting the top of my head put under a tile that the other character is standing behind :/
What kind of sprites are you using? because in default, that problem cannot happen because all actors and NPCs are inside the map-grid.


I'm assuming you're using larger sprites like the HF-Sprites, because otherwise such an overlap is impossible.


Unfortunately, because the default RTP cannot have the problem, there is nothing in default Ace to prevent this (the star passability can only move the tile in front of everything as you have already discovered.


You need a so-called Z-Level-Script to achieve the layering you want. Look for that on the Master Script List - there also is one in the HF-Packs for use with those sprites, but the script from the HF-Packs works differently and is probably not what you want.
for your prison bars, set the tile that you are using to depict them to 'star' passability.  That way the prisoners 'inside' them can come right up to them and the party 'outside' them can do the same, but neither can pass through them.

this doesn't solve your problem with outsize sprites if that is what you are using.
What kind of sprites are you using? because in default, that problem cannot happen because all actors and NPCs are inside the map-grid.

I'm assuming you're using larger sprites like the HF-Sprites, because otherwise such an overlap is impossible.

Unfortunately, because the default RTP cannot have the problem, there is nothing in default Ace to prevent this (the star passability can only move the tile in front of everything as you have already discovered.

You need a so-called Z-Level-Script to achieve the layering you want. Look for that on the Master Script List - there also is one in the HF-Packs for use with those sprites, but the script from the HF-Packs works differently and is probably not what you want.
Im using default size ace sprites, but arent they offset up by 4 pixels? hence the top of my head getting overlay (as ill show in my screenshot example)

I looked for Z-level script on master list but couldnt find it.

for your prison bars, set the tile that you are using to depict them to 'star' passability.  That way the prisoners 'inside' them can come right up to them and the party 'outside' them can do the same, but neither can pass through them.

this doesn't solve your problem with outsize sprites if that is what you are using.
Well it works like that only if the NPC and player are kept one tile apart, I want them to be right next to each other (above and below), but then the star tile hes behind overlays the top of my head, ill attach two shots of what i mean

1.JPG

2.JPG
http://forums.rpgmakerweb.com/index.php?/topic/2803-mss-correct-sprite-display/#entry30701
Thanks, tried it and it worked! hopefully I dont get the bugs the other ppl talked about but if so Ill ask about that later.
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/tile-layering-with-autonomous-characters-player.21445/