K
kingjohnc19
Guest
So I'm making a top-down RPG and I'm trying to make a tree object. Is there a way to detect whether the player is above or below this object, and change the depth based on this?
Would only be feasible if no other instances are moving around.You could do something like this in the tree object with the sprite centered.
I think I might have the dpeth values mixed up but this should work.Code:if obj_player.y>y{depth=10} // Below player object else{depth=-10} // Above player object
Lol tell me about it.. the new layers are a pain to get adjusted to. But the method you just mentioned seems to be the way to go!I can't stand GMS2, since depth and layer handling is so different, I guess you could try to do what they did in RPG Maker. You have a layer for all the tiles that are at the same level as a player, which will always drop below the player, and you have another player for overhead tiles which were always drawn above the player.