I think this is what you are after. I have used it in a fair few (unfinished

) projects so far. Very useful for RTS type games.
Rem Project: pickobject
Rem Created: Thursday, December 02, 2010
Rem ***** Main Source File *****
sync on
sync rate 60
autocam on
make object plain 1,500,1000
position object 1,0,0,0
xrotate object 1,90
color object 1,rgb(255,0,20)
`hide object 1
count=1
autocam off
set camera range 0,10,5000
do
text 0,0,"Object pos"+str$(nx#)+","+str$(nz#)
if mouseclick()=1 and rep=0
inc count
rep=1
`show object 1
clicked=PICK OBJECT(mousex(),mousey(),1,1)
nx#=GET PICK VECTOR X()+camera position x()
nz#=GET PICK VECTOR z()+camera position z()
make object cube count,10
position object count,nx#,0,nz#
`hide object 1
endif
if mouseclick()=0
rep=0
ENDIF
control camera using arrowkeys 0,1,1
sync
loop
I have left the basic check object visible, but rem in the lines I remmed out and it will be hidden and you can use another object terrain for your floor. I would imagine this works fine with a terrain object and adding in the y value as well instead of having it flat at 0.
http://s6.bitefight.org/c.php?uid=103081