My question (maybe you have read it in the other thread) is if its possibly to make the layer property change in relation to the enitites position on the map? Right now im working on a 3/4 topdown game and would like to have my character hidden when he walks behind a stone entity. but when he walks around and in front of the stone he should be visible. for now i had a solution to split the entity up in 2 parts - a hat and a foot. the hat is the top layer. after this comes the player and then the foot part of the stone. the player entity isnt high enough to grow over the foot part so he cant get hidden by the hat. but this is kinda no so elegant solution and will be more difficult when i add objects and maybe moving enemy entities.
I was thinking, this should be made easy if each entitys layer is oriented at their y value. like this
entitiesName.layer = -entitiesName.y
but this aint working. you have any ideas on this?