ID:1686155
 
(See the best response by Kaiochao.)
I have a tree icon that is bigger than 32x32. I want the crown of the tree to be a higher layer than the players so they can walk behind it while making the trunk of the tree dense. I don't know how to do multi-tiled icons but I tried to do this by cutting the tree into two icons (the crown & the trunk). How do I do this?

obj
Tree
name = "Tree"
icon = 'Tree1.dmi'
center
icon_state = "trunk"
density = 1
one
icon_state = "crown"
layer = MOB_LAYER+1


This makes two different icons, how do I make it so its still one icon?
Modify the pixel_x and pixel_y accordingly and just make sure it's dense with a higher layer than mobs.

ie: pixel_x = -16
I know I could do that but it would make it two different icons. I want to know if its possible to do whats in the code with just one icon.
Best response
If you're not using world.map_format = TILED_ICON_MAP, you don't have to do anything fancy to use large icons.

If you just set the icon of /obj/Tree to the icon of the whole tree, then the tree will be dense in the 32x32 tile at the bottom-left of the icon.

If you want its density to be more in the center, you can shift the icon to the left using pixel_x or you can shift the density right using bound_x (pixel movement only).

If you're using tile movement and single-tile player icons, it should be fine to make the entire tree layered above the player. Otherwise, you could use a "standing layer" solution.

It seems like a lot of parts of game development are related to a lot of other things you're doing or are planning to do. I guess that's why there are so many "Ifs" in my post.
Found a problem, the ATOM messes up the "walking behind the tree" look. Any way to change the order of ATOM temporarily?