ID:170350
 
Ok, so I have my trees on the map all nice and neat. Now, i just need to figure out how to get the top part of the tree to be in front of the user, kinda like on mystic journey. I think I might need to use the overlay procedure. I am not sure though. Here's the code for the top portions of the tree:

obj
tree3
icon = 'tree.dmi'
icon_state = "tl"
density = 1

obj
tree4
icon = 'tree.dmi'
icon_state = "tr"
density = 1

So, how do i get the top portion behind the user? Oh, and does the tree top need to be dense?
turf
tree3
icon = 'tree.dmi'
icon_state = "tl"
layer=50

turf
tree4
icon = 'tree.dmi'
icon_state = "tr"
layer=50

Well you don't need to put it dense cause then can't walk thru it :P.You just need the "layer"for more info on how to use the layer press f1 in dreammaker and look up layer.
In response to DaGoat787
thanks man
i have a bteer idea.
/obj/tree_nuller/
icon=//insert file here
New()
spawn()
if(istype(loc,/turf/tree))
loc.layer=FLY_LAYER+100
(loc.density?loc.density=FALSE:loc.density=FALSE)
spawn(5)del src

so just place these objects where you would like the tree to be higher than other things.
In response to Angel_Inc
I am pretty sure you need a ..() in the begining of that New() proc.
In response to Angel_Inc
Angel_Inc wrote:
i have a bteer idea.
/obj/tree_nuller/
icon=//insert file here
New()
spawn()
if(istype(loc,/turf/tree))
loc.layer=FLY_LAYER+100
(loc.density?loc.density=FALSE:loc.density=FALSE)
spawn(5)del src


This just doesn't work. FLY_LAYER is -1, so adding 100 isn't going to magically make this 100 layers above where FLY_LAYER would appear. Anything with FLY_LAYER will appear above it, since DS treats this differently from regular layers.

Moreover, this line makes zero sense:
(loc.density?loc.density=FALSE:loc.density=FALSE)


I can't for the life of me figure out what you were trying to do there. You can't set a value from within an expression like that like you can do in C. If you could, it wouldn't make sense to use the ternary ?: operator here because either way you're setting density to false. And overall, this isn't a statement; it's an expression. It's like you said just 5 instead of x=5.

Lummox JR