Yes, you can lock multiple objects.
If you use Sparky's, I recommend using raycasting. It would be easier then moving a cube and checking where it collides.
Using this:
if ( dbMouseClick() == 1 )
{
//get our collision vector
float oldx = dbCameraPositionX();
float oldy = dbCameraPositionY();
float oldz = dbCameraPositionZ();
dbMoveCamera( 2000 );
float x = dbCameraPositionX();
float y = dbCameraPositionY();
float z = dbCameraPositionZ();
dbMoveCamera( -2000 );
collide = SC_RayCast( 0, oldx,oldy,oldz, x,y,z, 0 );
}
It will cast a ray from the camera and store the object that it hit in the "collide" variable.