i made a little demo.....but..you can do it ..many other way
print "Arrow Key to Move"
print "Mouse to Rotate Camera"
print "LeftClick to shot"
print "Just shoot on the guy..and his limbs will fall"
wait key
set display mode 1024,768,16
backdrop off
set camera range 1,6000
sync on
sync rate 0
set camera rotation ZYX
autocam off
hide mouse
make object sphere 99,10000
color object 99,rgb(175,0,0)
set object 99,1,1,0
create bitmap 1,1024,1024
ink rgb(100,0,0),0
box 0,0,512,512
ink rgb(0,100,0),0
box 512,0,1023,512
ink rgb(0,0,100),0
box 0,512,512,1023
ink rgb(0,0,0),0
box 512,512,1023,1023
get image 1,0,0,1024,1024
delete bitmap 1
make matrix 1,50000,50000,70,70
prepare matrix texture 1,1,1,1
fill matrix 1,0,0
update matrix 1
rem corps
make object box 1,100,200,100
rem bras
make object box 2,30,100,30
make mesh from object 1,2
delete object 2
rem jambe
make object box 2,30,100,30
make mesh from object 2,2
delete object 2
rem point de rotation
make object plain 2,1,1
make mesh from object 3,2
delete object 2
rem faire un object pour le corps....pour collision
make mesh from object 4,1
make object 2,4,0
delete mesh 4
glue object to limb 2,1,0
rem adder les bras/jambe au perso
for i=1 to 4
add limb 1,i,1
make object i+2,1,0
make object i+6,2,0
set object rotation ZYX i+2
set object rotation ZYX i+6
glue object to limb i+2,1,i
next i
rem adder les jambes au perso
for i=1 to 4
add limb 1,i+4,2
glue object to limb i+6,1,i+4
next i
rem adder les point de rotation au perso
for i=9 to 16
add limb 1,i,3
next i
rem fixer les bras/jambe aux point de rotation
for i=1 to 8
link limb 1,i,i+8
next i
rem fixer les point de rotation aux.....membre ki les font bouger..
for i=1 to 4
link limb 1,8+(2*i),(i*2)-1
next i
rem offsetter les bras/jambe de leur point de rotation
for i=1 to 8
offset limb 1,i,0,-50,0
next i
rem offset les bras/jambe ...du bas ..par rapport..a leur bras/jambe du haut
for i=1 to 4
offset limb 1,8+(i*2),0,-50,0
next i
rem POSITIONNEMENT FINAL: mettre les bras/jambe a la bonne place (en positionnant seulemnt leur point de rotation)
offset limb 1,9,-60,100,0
offset limb 1,11,60,100,0
offset limb 1,13,-40,-100,0
offset limb 1,15,40,-100,0
rem Tete
make object box 11,50,50,50
set object rotation ZYX 11
make mesh from object 4,10
add limb 1,17,4
glue object to limb 11,1,17
offset limb 1,17,0,125,0
for i=0 to 17
hide limb 1,i
next i
rem variable...de positionnement
x#=25000
z#=24500
y#=get ground height(1,x#,z#)+425
ay#=0
ax#=0
position camera x#,y#,z#
Ex#=25000
Ez#=25000
Ey#=get ground height(1,x#,z#)+300
Eay#=0
position object 1,ex#,ey#,ez#
dim move(11)
dim vitess#(11)
dim descend(11)
Acc#=0.05
rem rotater les bras/jambe ...pour pouvoir lui couper les membres..avec précision :)
set object rotation ZYX 1
rem faire le...projectile kon va lancer
make object box 12,5,30,5
color object 12,rgb(200,0,0)
set object rotation ZYX 12
lock object on 12
xrotate object 12,90
fix object pivot 12
position object 12,0,-10,20
for i=2 to 12
set object collision to polygons i
next i
dim couper(11)
for i=1 to 11
couper(i)=0
next i
rem animation
clear all object keyframes 1
i=1:rotate limb 1,8+((i*3)-(3-i)),45,90,0:rotate limb 1,10+((i*3)-(3-i)),45,270,0:set object keyframe 1,0
rotate limb 1,13,45,0,0:rotate limb 1,14,315,0,0:rotate limb 1,9,45,45,0:rotate limb 1,11,315,90,0:set object keyframe 1,10
rotate limb 1,13,0,0,0:rotate limb 1,14,0,0,0:rotate limb 1,15,45,0,0:rotate limb 1,16,315,0,0:rotate limb 1,9,45,90,0:rotate limb 1,11,315,135,0:set object keyframe 1,20
rotate limb 1,15,0,0,0:rotate limb 1,16,0,0,0:rotate limb 1,13,45,0,0:rotate limb 1,14,315,0,0:rotate limb 1,9,45,45,0:rotate limb 1,11,315,90,0:set object keyframe 1,30
loop object 1,10,30
do
if rnd(100)=10 then yrotate object 1,wrapvalue(object angle y(1)+rnd(10)-5)
move object 1,-2
ax#=camera angle x()
if rightkey()=1 then rotate camera 0,wrapvalue(camera angle y()+90),0:move camera 10:rotate camera ax#,wrapvalue(camera angle y()-90),0
if leftkey()=1 then rotate camera 0,wrapvalue(camera angle y()-90),0:move camera 10:rotate camera ax#,wrapvalue(camera angle y()+90),0
if upkey()=1 then rotate camera 0,camera angle y(),0:move camera 10:rotate camera ax#,camera angle y(),0
if downkey()=1 then rotate camera 0,camera angle y(),0:move camera -10:rotate camera ax#,camera angle y(),0
if (mouseclick()=1) and (tire=0)
lock object off 12
position object 12,camera position x(),camera position y(),camera position z()
rotate object 12,camera angle x(),camera angle y(),0
Tire=1
time#=timer()
endif
if tire=1
move object 12,30
restore aka
for i=2 to 11
read limb
read limb2
if couper(i)=0
unglue object i
rotate object i,limb angle x(1,limb)+limb angle x(1,limb2)+limb angle x(1,0),limb angle y(1,limb)+limb angle y(1,limb2)+limb angle y(1,0),0
if i=11 then rotate object i,limb angle x(1,17)+limb angle x(1,0),limb angle y(1,17)+limb angle y(1,0),0
if (object collision(i,12)=1)
couper(i)=1
move(i)=1
stop=1
else
rotate object i,0,0,0
glue object to limb i,1,i-2
if i=11 then glue object to limb 11,1,17
endif
endif
next i
if sqrt((object position x(12)-camera position x() )^2+(object position y(12)-camera position y() )^2+(object position z(12)-camera position z() )^2)>=5000 then stop=1
if (object position y(12)<=0) or (stop=1)
lock object on 12
rotate object 12,0,0,0
position object 12,0,-10,20
tire=0
stop=0
endif
endif
for i=2 to 11
if (couper(i)=1) and (move(i)=1)
vitess#(i)=vitess#(i)-acc#
position object i,object position x(i),object position y(i)+vitess#(i),object position z(i)
if object position y(i)<=10 then position object i,object position x(i),0,object position z(i):move(i)=0:vitess#(i)=0
endif
next i
rotate camera wrapvalue(camera angle x()+(-1*mousemovey()/2)),wrapvalue(camera angle y()+(mousemovex()/2)),0
position object 99,camera position x(),camera position y(),camera position z()
set cursor 0,0
print "FPS=",screen fps()
print tire
sync
loop
aka:
data 0,17,9,17,10,9,11,17,12,11,13,17,14,13,15,17,16,15,17,17