I've made a little something from that code, hope it help some one, or just have a peek to see what I did tonight.
I've included the model as a download so don't run it with out it, or the code wont work.
`****************************************
`* 03-11-2008 // 04:45:43 *
`* this to show physic meshs *
`* by Sindore *
`****************************************
sync on : sync rate 60
autocam off
hide mouse
`set camera start position
position camera 0,10,-20
`start physics
phy start
`Loads Your Object You want
load object "stone_piller_01.x",1
scale object 1,1000,1000,1000
color object 1,rgb(225,225,225)
`Gives your object Collisions
phy make rigid body static mesh 1,"phy_stone_piller_01.x"
phy load rigid body static mesh 1,"phy_stone_piller_01.x"
`make floor
make object cube 2,1
scale object 2,5000,5,5000
position object 2,0,-6,0
phy make rigid body static box 2
`make wall
make object cube 3,1
scale object 3,5000,2500,5
position object 3,0,5,25
phy make rigid body static box 3
`make wall
make object cube 4,1
scale object 4,5000,2500,5
position object 4,0,5,-25
phy make rigid body static box 4
`make wall
make object cube 5,1
scale object 5,5,2500,5000
position object 5,25,5,0
phy make rigid body static box 5
`make wall
make object cube 6,1
scale object 6,5,2500,5000
position object 6,-25,5,0
phy make rigid body static box 6
for c = 3 to 6
ghost object on c
next c
ID as integer
ID = 7
c as integer
timer1 as integer
x# as float
y# as float
z# as float
do
`randome numbers
randomize timer()
`random positions
x# = rnd(10)-rnd(10)
y# = 15+rnd(15)
z# = rnd(10)-rnd(10)
`make falling objects
if ID <= 307
inc ID
make object cube ID,1
phy make rigid body dynamic box ID
phy set rigid body position ID,x#,y#,z#
endif
`max number of objects sets off timer
if ID >= 307 then inc timer1
`delete objects and reset
if timer1 >= 500
for c = 7 to ID
if object exist(c)>0
phy delete rigid body c
delete object c
endif
next c
ID = 7
timer1 = 0
endif
`camera controle
yrotate camera wrapvalue(camera angle y() + mousemovex()*0.3)
xrotate camera wrapvalue(camera angle x() + mousemovey()*0.3)
if mouseclick()=1 then move camera 0.25
if mouseclick()=2 then move camera -0.25
`update physics
phy update
sync
loop
sorry if it is a bit sloppy.
From the dark and in to the light, twisted the body of madness, dark souls to only the one who would be called, Death lord of the dead, king of the forgotten, keep of lost souls.