So... I'm making a little Isaac/Gungeon style game. I'm doing pretty good so far, it's working out great. However, I am experiencing a graphical glitch involving the Z layer. I'm not sure if I'm doing this right, but I have two events, "compare y of player to npc, if player y is greater than npc y, move in front of npc" and "compare y of player to npc, if player y is less than npc y, move behind of npc"
This might not be how it's done though. I've tried "for each" but that doesn't work. ONLY the first instance of npc functions properly. All others don't follow the "if player y >/< npc y" event.
I saw someone post something similar to this a while ago, but the "solution" also didn't really help. I'm out of ideas. Anyone know what to do?