i dont know if this has been done before but here it is anyway
function ObjectExistAt(x,y,z,x#,y#,z#,range_min,range_max)
`x,y and z are to check for those co-ordinates, 0 not to check, 1 to check
`x#,y# and z# are the co-ordinates to check, if you are not checking them then enter 0
`range_min and range_max is the range of objects
`will return a 0 if no object exist, a 1 if an object does exist
xr=0 : yr=0 : zr=0 : r=0
for o=range_min to range_max
if x?=0 then xr=1
if x?=1 AND object position x(o)=x# then xr=1
if y?=0 then yr=1
if y?=1 AND object position y(o)=y# then yr=1
if z?=0 then zr=1
if z?=1 AND object position z(o)=z# then zr=1
if xr=1 AND yr=1 AND zr=1
r=1
else
r=0
endif
next o
endfunction r
i kno this is very limited but it can be useful,
i have only done projects that require little movements and are not first/third person, kinda arcade games, thus making it limited.
it can easily be changed to make more room for detection (i think

)