you can now use the pick object command in dbpro! this makes it all alot easier
sync on
sync rate 50
rem position some random cubes
for t=1 to 10
make object cube t,50
position object t,rnd(500),0,rnd(500)
next t
rem main loop
do
rem print selected object number
set cursor 0,0
print "Object selected> ";a
rem allow user to rotate camera
if rightkey()=1 then turn camera right 1
if leftkey()=1 then turn camera left 1
rem check if an object is under the mouse
a=pick object(mousex(),mousey(),1,50)
rem after mouseclick if the mouse is over an object color that object
if mouseclick()=1
if a>0
color object a,rgb(255,0,0)
endif
endif
rem sync+ end of loop
sync
loop
in dbc however it is harder