This is the whole code
and the tree mesh iam using
and an image too
function setupmap(objnum)
perform checklist for object limbs objnum
total = checklist quantity()
open to write 1,"Debugger.txt"
for i = 0 to total-1
lname$ = limb name$(objnum,i)
cmd$ = left$(lname$,5)
param$ = right$(lname$,3)
write string 1,lname$
write string 1,cmd$
write string 1,param$
write string 1,"-----------"
if (cmd$ = "_hide")
hide limb objnum,i
endif
if (cmd$ = "_tree")
hide limb objnum,i
inc loadedobjects,1
set image colorkey 0,0,0
load object "tree_09.x",loadedobjects + 500
position object loadedobjects + 500, limb position x(objnum,i),limb position y(objnum,i),limb position z(objnum,i)
scale object loadedobjects + 500,30,30,30
load image "b.png",444,1
texture object loadedobjects + 500,444
endif
`if command$ = "_remv" then remove limb objnum,i
if cmd$ = "_hero"
position object hero,limb position x(objnum,i),limb position y(objnum,i),limb position z(objnum,i)
rotate object hero,limb direction x(objnum,i),limb direction y(objnum,i),limb direction z(objnum,i)
hide limb objnum,i
endif
close file 1
next i
endfunction