Ok, here's the fixed code. The problem was that you were calling the collision object function a second time for object 600 (the sphere)
I fixed the code so collision works properly.
Also, I commented out the part where it exits, just so I could test.
NOTE: It includes the fancy stuff, for a little better cleanup of memory.
set display mode 640,480,32
sync on : sync rate 50
hide mouse
autocam off
center text 320,200,"Loading"
sync
load dll "dbcollisions.dll",1
if checkcoll(1)>0 then exit prompt "There has been an error with the collision system","Error" : end
set text font "courier new"
set text size 40
hide light 0
make light 1
make light 2
position light 2,0,5,0
position light 1,0,100,0
position camera 0,190,-150
point camera 0,0,0
Dim MasterObjNo(1) : MasterObjNo(0) = 1
load object "1.x",1
obcollnumm=lco(1)
color object 1,rgb(240,5,10)
show object 1
`ok = call dll(1, "CreateModelLog")
make object plain 900,640,480
position object 900,0,-120,170
xrotate object 900,-60
make object sphere 600,30
position object 600,-40,100,0
`obcollnum=lco(600)
show object 600
`load object "explode.3ds",700
`scale object 700,150,150,150
`set object speed 700,70
`position object 700, 0,-500,0
`hide object 700
load image "back.bmp",1
load music "mnu.mid",1
load music "2.mid",2
`load music "lose.mid",3
`load sound "explode.wav",1
color backdrop rgb(0,100,80)
color object 600,rgb(0,200,20)
texture object 900,1
loop music 1
start:
backdrop on
position object 600,-40,100,0
yrotate object 600,0
while upkey()=0
center text 320,10,"Press Upkey to start"
sync
endwhile
do
move object down 600,2
move camera 3
if object position y(600)=20 then exit
sync
loop
stop music 1
play music 2
y=20
m#=1
s=0
do
oldx#=object position x(600) : oldy#=object position y(600) : oldz#=object position z(600)
move object 600,m#
if rightkey()=1 then turn object right 600,rnd(7)
if leftkey()=1 then turn object left 600,1
`position object 600,object position x(600),y,object position z(600)
move object down 600,1
m#=m#+.001
newx#=object position x(600) : newy#=object position y(600) : newz#=object position z(600)
bHit = call dll(1, "UpdateSlidingCollision", 15.0, 0.0, newx#, newy#, newz#, oldx#, oldy#, oldz#)
newx# = call dll(1, "NewPlayerX")
newy# = call dll(1, "NewPlayerY")
newz# = call dll(1, "NewPlayerZ")
position object 600,newx#,newy#,newz#
`if object position y(600)<-5 then exit
s=s+1
center text 320,10,"Score:"
set text size 30
center text 320,50,str$(s)
set text size 40
sync
loop
end
Function LCO(obnum)
` Create Collision Object
`CollisionObjNo = obnum
Hide object obnum
` Make a mesh -> Memblock -> Pointer
blocknum = obnum + 40
meshnum = obnum + 40
make mesh from object meshnum, obnum
make memblock from mesh blocknum, meshnum
MeshPtr = GET MEMBLOCK PTR(blocknum)
`delete mesh 1
`Make Collision Object in DLL - this is the ONLY difference between Pro & 1.13 versions
OK = call dll(1, "CreateCollisionObjectPro", MeshPtr)
delete memblock blocknum
delete mesh meshnum
EndFunction CollisionObjNo
Function CheckColl(i)
retval = 0
if dll exist(i) = 0 then retval = 1
if dll call exist(i, "CreateCollisionObjectPro") = 0 then retval = 2
if dll call exist(i, "CreateCollisionVertex") = 0 then retval = 3
if dll call exist(i, "CreateModelLog") = 0 then retval = 4
if dll call exist(i, "DefineVerts") = 0 then retval = 5
if dll call exist(i, "GetNumFaces") = 0 then retval = 6
if dll call exist(i, "UpdateSlidingCollision") = 0 then retval = 7
if dll call exist(i, "NewPlayerX") = 0 then retval = 8
if dll call exist(i, "NewPlayerY") = 0 then retval = 9
if dll call exist(i, "NewPlayerZ") = 0 then retval = 10
if dll call exist(i, "HitNormalX") = 0 then retval = 11
if dll call exist(i, "HitNormalY") = 0 then retval = 12
if dll call exist(i, "HitNormalZ") = 0 then retval = 13
if dll call exist(i, "HitX") = 0 then retval = 14
if dll call exist(i, "HitY") = 0 Then retval = 15
if dll call exist(i, "HitZ") = 0 Then retval = 16
EndFunction retval