If u make a model with the same limb heirachy and limb numbers then it will behave the same as creating it with code.
consult this puppetry snippet for an idea.
rem ---------------------------------------------------------------------
rem DT BEASTMOUNT TEST 1
rem indi march 25 2003
rem ---------------------------------------------------------------------
sync on
sync rate 60
make matrix 1,4,4,4,4
position matrix 1,-2,-0,-2
rem the body
make object sphere 1,0.8
color object 1,rgb(0,155,0)
position object 1,0,0,0
rem a temp mesh for neck parts
make object sphere 100,0.3
make mesh from object 1,100
delete object 100
rem the neck head flame limbs
for i = 1 to 5
add limb 1,i,1
offset limb 1,i,0,i*0.03,i*0.02
color limb 1,i,rgb(0,155,0)
next i
rotate limb 1,1,15,0,0
scale limb 1,1,100,100,100
rotate limb 1,2,25,0,0
scale limb 1,2,95,95,95
rotate limb 1,3,35,0,0
scale limb 1,3,90,90,90
rotate limb 1,4,45,0,0
scale limb 1,4,85,85,85
rotate limb 1,5,55,0,0
scale limb 1,5,80,80,80
rem offset the first neckbone more foward
offset limb 1,1,0,0.2,0.4
rem linking neck heirachies
link limb 1,1,2
link limb 1,2,3
link limb 1,3,4
link limb 1,4,5
rem the visible head
make object sphere 3,0.5
rotate object 3,90,0,180
fix object pivot 3
scale object 3,80,80,150
color object 3,rgb(25,125,0)
set object 3,1,1,1,0,1,0
glue object to limb 3,1,5
rem a temp mesh for Leg parts
make object cone 100,1
scale object 100,40,50,60
make mesh from object 2,100
delete object 100
rem the leg limbs
for i = 6 to 9
add limb 1,i,2
color limb 1,i,rgb(15,155,0)
next i
rem Leg offsets
offset limb 1,6,0.2,0,0.2
offset limb 1,7,-0.2,0,-0.2
offset limb 1,8,-0.2,0,0.2
offset limb 1,9,0.2,0,-0.2
rem a temp mesh for Leg parts
make object sphere 100,0.5
make mesh from object 3,100
delete object 100
rem setup the camera
position camera 0,0,2,-2
point camera 0,0,0,0
rem TEMP MAIN LOOP
disable escapekey
while escapekey()=0
if spacekey()=1
rem moves legs
rem front legs
rotate limb 1,6,-45,0,0
rotate limb 1,8,-45,0,0
rem back legs
rotate limb 1,7,45,0,0
rotate limb 1,9,45,0,0
position object 1, object position x(1),0.05, object position z(1)
else
rem front legs
rotate limb 1,6,0,0,0
rotate limb 1,8,0,0,0
rem back legs
rotate limb 1,7,0,0,0
rotate limb 1,9,0,0,0
position object 1, object position x(1),0.0, object position z(1)
endif
rem mouse relation
cx#=wrapvalue(cx#+mousemovey()*0.6)
cy#=wrapvalue(cy#+mousemovex()*0.6)
cz#=wrapvalue(cz#+mousemovez()*0.6)
acx#=curveangle(cx#,acx#,1.1)
acy#=curveangle(cy#,acy#,1.1)
acz#=curveangle(cz#,acz#,1.1)
rotate object 1,0,acy#,0
rotate limb 1,1,acx#,neck1_yRot#,acz#
rotate limb 1,2,acx#,neck1_yRot#,acz#
rotate limb 1,3,acx#,neck1_yRot#,acz#
rotate limb 1,4,acx#,neck1_yRot#,acz#
if mouseclick()=1
if neck1_yRot# > 45.0 then neck1_yRot# = 45.0
neck1_yRot#=neck1_yRot#+1.0
endif
if mouseclick()=2
if neck1_yRot# < -45.0 then neck1_yRot# = -45.0
neck1_yRot#=neck1_yRot#-1.0
endif
lpx1# = limb position x(1,1)
lpy1# = limb position y(1,1)
lpz1# = limb position z(1,1)
ldx1# = limb direction x(1,1)
ldy1# = limb direction y(1,1)
ldz1# = limb direction z(1,1)
text 10,10,"lpx1:"+STR$(lpx1#)
text 10,30,"lpy1:"+STR$(lpy1#)
text 10,50,"lpz1:"+STR$(lpz1#)
text 10,70,"ldx1:"+STR$(ldx1#)
text 10,90,"ldy1:"+STR$(ldy1#)
text 10,110,"ldz1:"+STR$(ldz1#)
sync
endwhile
delete object 1
end