So I have a problem where actors and enemies can possibly overlap each other in battle thanks to them not going back to a normal home position after attacks. they will basically stay where they are. I found this
https://forums.rpgmakerweb.com/index.php?threads/sv_enemy-showing-under-sv_actor.118271/
and it sort of helps... but I've come across a problem I wasn't thinking about while setting this up.

as you can see the player looks like they're standing on top of the enemy. So I was curious, is there a way to give priority to whichever actor/enemy is closer to the bottom of the screen. The problem seems to be either all actors or all enemies get priority at any given time. but I was wondering if I could change that to more so who ever is closer to the bottom of the screen to appear over those above them.
Basically, I need the priority based on depth and not whether the combatant is an actor or enemy... is that possible?
https://forums.rpgmakerweb.com/index.php?threads/sv_enemy-showing-under-sv_actor.118271/
and it sort of helps... but I've come across a problem I wasn't thinking about while setting this up.

as you can see the player looks like they're standing on top of the enemy. So I was curious, is there a way to give priority to whichever actor/enemy is closer to the bottom of the screen. The problem seems to be either all actors or all enemies get priority at any given time. but I was wondering if I could change that to more so who ever is closer to the bottom of the screen to appear over those above them.
Basically, I need the priority based on depth and not whether the combatant is an actor or enemy... is that possible?