ID:145802
 
Code:
turf/treesB
Entered(mob/M)
if(ismob(M))
if(M.client){if(istype(M) && M.allow_)M.Walk()}
tree3
icon = 'turfs.dmi'
icon_state = "tree3"
layer = MOB_LAYER+52


Problem description:

How can I make the player appear on the tree through the layer and then set it back when they walk off?
bump.
please elaborate better, do you want the player to appear behind the tree? Then just changing the layer like you did would do that.

You want the player to appear partly on the tree? Well then you'll need to make a second icon for that player for how you want him to look when he's in the tree, and then set the icon_state of that user to that icon_state!

In response to Jon Snow
I want him to appear above the tree. as ontop of it. HENCE THE LAYER.
In response to XzDoG
The layer you set puts the tree on a layer far above the mob, it doesnt put any mobs on its layer higher than itself.. You have that incorrect. You need to have the mob on a layer higher than the tree, for the mob to go over the tree.

-Edit-

I haven't played with layering a whole lot, but this might work?
layer=MOB_LAYER-1


I can't say for sure though. Just thought I'd throw that out there before runnin' out the door, no time to test it.
In response to Detnom
OMG. I am trying to keep calm but do you guys even read everything!?!? The tree has a layer higher than the mob so they can walk under it. But with the right conditions (SHOWN IN THE F*C#$(&#;$*$ CODE) they can walk above that layer and when they walk off their old layer returns.
In response to XzDoG
well. what? how does your code do dat?
meh w/e
turf
tree
icon = 'trees.dmi'
Entered(mob/m)
if(istype(m,/mob/player/))
if(m.walkontree)
src.layer = m.layer
src.layer -= 1
else
src.layer = m.layer
src.layer += 1

mob
var
walkontree = 0

verb
walkontrees()
usr.walkontree = 1
dontwalkontrees()
usr.walkontree = 0

fully tested. now calm down or no code for you.
In response to Rky_nick
Thank you, perhaps you could also help with this: [link]
In response to Rky_nick
I wouldn't recommend decrementing the tree's layer, since this is most likely for XzDog's Naruto game, which is multiplayer. Once the tree's layer has been reduced, any mob that enters will be on top(under normal circumstances, density may protect against this, but unexpected things can happen). Rather than decreasing the tree's layer, why not increase the mob's layer? Then decrease the mob's layer to MOB_LAYER once finished.

Hiead