For DarkEDIT
From the menu at the top
Click on Edit > Edit Options... > DarkBASIC Options
There should be a heading that reads: DarkBASIC Program:
Type the path in the box to DB.exe (usually C:\Program Files\Dark Basic Software\Dark Basic\DB.exe) or click on the little folder and select the path.
The only reason the cube stops in the middle of the sphere is because you are pointing the cube at the sphere each loop. Once it's at the center of the sphere, it just keeps pointing there so it never moves away. It never actually uses the collision test.
The commands get object collisionx(), get object collision y() and get object collision z() can only be used in sepcific cases. You have to use the command Make Object Collision Box to create an area of collision around the object. This is the only type of collision that will return a value in get object collision x() y() or z(). You can test for collision without those in this modified version of your code:
rem strange collision
rem i just want to get the collision as if
rem it was an object collision box
REM which means that the sphere stops
rem as soon as it touches the box
rem collide
rem not inside
SYNC ON
SYNC RATE 60
make object sphere 2,25
set object collision on 2
set object collision to SPHERES 2
autocam off
make object cube 1,25
set object collision on 1
set object collision to boxes 1
position object 1,200,0,0
point object 1,0,0,0
position camera 0,0,-200
`position object 1,rnd(120),0,0
`position object 2,10,0,0
GHOST OBJECT ON 1
`position camera 0,0,-70
COLOR OBJECT 1,RGB(rnd(255),rnd(255),rnd(255))
COLOR OBJECT 2,RGB(rnd(255),rnd(255),rnd(255))
SYNC
do
`point object 1,10,0,0
move object 1,1
posx#=object position x(1)
posy#=object position y(1)
posz#=object position z(1)
`if object collision(1,2)>0
` dec posx#,get object collision x()
` dec posy#,get object collision y()
` dec posz#,get object collision z()
`endif
if object collision(1,2)
move object 1,-1
endif
`POINT CAMERA posx#,posy#,posz#
`position object 1,posx#,posy#,posz#
SYNC
loop
The best thing to do is to check out TDK's collision tutorial to give you a better idea of how to deal with collision.
TDK's Tutorials
Enjoy your day.