ID:154947
 
I'm trying out new things with programming and I wanted to know if it is possible to code multiple object overlays on one object. Basically, I have a tree trunk object that I want to add leaves too, but I don't want to add the icon in as an entire whole one object.

Sorry if that I'm asking is confusing!
Of course this is possible, just add them all in as separate icon overlays:

obj/tree/proc/Add_Leaves()
for(var/i = 10, i, i--)
var/icon/leaf = new()
leaf.icon = 'icons.dmi'
leaf.icon_state = "leaf"
leaf.pixel_x += rand(-10,10) //Give it a slight pixel offset so it looks nicer :)
leaf.pixel_y += rand(-10,10)
src.overlays += leaf