Take what you want from this
autocam off
make object cube 1,1
position object 1,0,0,-10
make object sphere 2,1
do
if leftkey() then turn object left 1,.1
if rightkey() then turn object right 1,.1
mx=mx+mousemovex()
my=my+mousemovey()
rotate camera 0,object angle x(1),object angle y(1),object angle z(1)
position camera 0,object position x(1),object position y(1),object position z(1)
turn camera right 0,mx
pitch camera down 0,my
loop
Cube is looking at a sphere, camera is on the cube. Left and right arrow keys to turn the cube left and right, mouse to look around. Is this what you need?