Tree()
set category = "Build"
if(src.Nobuild())
var/O = new/obj/Tree(usr.loc) //creates a tree using icon states
O:owner = "[usr.key]"
switch(input("What part of the tree do you wish to build?","part") in list("top-right","top-left","bottom-right","bottom-left"))
if("top-right")
icon_state="tr overlay"
density = 0
layer = MOB_LAYER+1
if("top-left")
icon_state="tl overlay"
density = 0
layer = MOB_LAYER+1
if("bottom-right")
icon_state="br"
density = 1
if("bottom-left")
icon_state="bl"
density = 1
Problem description:
Now, I wrote this up in the hopes that the pop-up would show allowing someone to select the diffrent icon states within the dmi file. the pop-up comes up but doesnt show the sprite that is supposed to be loaded... I would like to make the whole tree appear all at once with the top part on a layer above the mob and the bottom layer on the object level as dense when built. any ideas?
Im no expert, but I would make 4 dummy objects with the same icon at the tree, but with the different icon states. Then when the user picks and obj, take the obj's icon_state and use that in your build.
Just a theory, heads a lil too fuzzy to make any psuedo code at the moment :P