Now I don't remember exactly how to add mesh to a mesh, but when you have your object ready, you can do it from Dbpro with code just geting limb position x,y,z and angle . Take a look to this example .
REMSTART
animating bones of an object made in 3DMax and exported with panda to .x
REMEND
hide mouse
make matrix 1,10000.0,10000.0,25,25
load bitmap "cesped2.bmp",1
get image 1,1,1,100,100
get image 2,80,80,120,120
delete bitmap 1
prepare matrix texture 1,1,2,2
randomize matrix 1,50.0
set ambient light 60
sync on
load object "pas.x",70
position object 70,120,100,350
set object collision off 70
clone object 71,70
position object 71,320,100,350
clone object 72,70
position object 72,520,100,350
rem making the gun (simple box)
make object box 80,5,5,40:offset limb 80,0,0,5,-20
color object 80,rgb(80,40,30)
parte=1
do
set cursor 5,5
print "THE OBJECTS HAS NOT ANIMATION AT ALL, AND THE ANIMATION IS MADE WITH CODE."
gosub _controla_camara
`animation timer
cron=cron+1
if cron>400 then cron=0
if cron<200 then rota#=rota#+0.1
if cron>200 then rota#=rota#-0.1
`legs
rotate limb 70,11,0,0,rota#
rotate limb 70,3,0,0,rota#
`knees
rotate limb 70,4,0,0,-rota#*2
rotate limb 70,12,0,0,-rota#*2
`right arm and forearm
rotate limb 70,21,0,rota#/3,45 `brazo
rotate limb 70,22,0,0,rota#*4 `antebrazo
rotate limb 70,23,0,0,rota#*2
scale limb 70,23,100,100,200
rem placing and rotating the gun
lx#=limb position x(70,24)
ly#=limb position y(70,24)
lz#=limb position z(70,24)
position object 80,lx#,ly#,lz#
rotate object 80,rota#*5,0,0
`left arm
rotate limb 70,31,0,-rota#/2,45
if mouseclick()then rotate limb 70,32,a#,cam#,50
scale limb 70,33,100,100,200
offset limb 70,1,-rota#/3,0,0
`waist
rotate limb 70,18,0,0,rota#*2
rotate limb 70,19,rota#,0,0
`========================================
`second DUMY
`right arm
rotate limb 71,21,0,rota#*2,ROTA#*3
rotate limb 71,22,0,-rota#*7,0
`left arm
rotate limb 71,31,0,-rota#*2,ROTA#*3
rotate limb 71,32,0,rota#*7,0
`body and left leg
rotate limb 71,1,0,rota#,0
rotate limb 71,3,0,-rota#,0
rotate limb 71,11,0,0,rota#*3
rotate limb 71,12,0,0,-rota#*6
`========================================
rotate limb 72,11,0,0,-20+rota#*2
rotate limb 72,31,0,0,-20+rota#*2
rotate limb 72,32,0,0,30-rota#
rotate limb 72,12,5,0,-20+rota#
rotate limb 72,3,0,0,20-rota#*2
rotate limb 72,21,0,0,20-rota#*2
rotate limb 72,22,0,0,20+rota#
rotate limb 72,4,-5,0,-rota#
rotate limb 72,19,-20+rota#,0,0
rotate limb 72,18,0,-10+rota#/2,0
sync
loop
_controla_camara:
oldx#=x#
oldz#=z#
if upkey()=1 then x#=newxvalue(x#,a#,1) : z#=newzvalue(z#,a#,1)
if downkey()=1 then x#=newxvalue(x#,a#,-1) : z#=newzvalue(z#,a#,-1)
if leftkey()=1 THEN x#=NEWXVALUE(x#,a#-90,1):z#=NEWZVALUE(z#,a#-90,1)
if rightkey()=1 THEN x#=NEWXVALUE(x#,a#-90,-1):z#=NEWZVALUE(z#,a#-90,-1)
a#=wrapvalue(a#+mousemovex()/2)
cam#=wrapvalue(cam#+mousemovey()/2)
rotate camera cam#,0,0
yrotate camera a#
`camera limits
if cam#<=290 and cam#>180 then cam#=290
if cam#>=70 and cam#<180 then cam#=70
position camera x#,145,z#
return
I'm not a grumpy grandpa
