im trying to make a camera follow an object, which i got to work. I also want it to be able to rotate around the object while the object moves. I would like to have it rotate the camera when mousex()>1000 and also when mousex()<11. i have searched for more information in codebase and here and found some things that i couldnt get to work the most useful is probably what wabler said in this thread
http://www.thegamecreators.com/?m=forum_view&t=23900&b=7 but i couldnt understand it
the code i have is here
function controlcam(obj,cam)
height=500
if upkey()=1 then move object obj,1
if rightkey()=1 then turn object right obj,1
if leftkey()=1 then turn object left obj,1
if downkey()=1 then move object obj,-1
if mousex()>1000 then ang#=wrapvalue(ang#+.4)
if mousex()<11 then ang#=wrapvalue(ang#-.4)
set camera to follow cam,object position x(obj),object position y(obj),object position z(obj),ang#,400,500,20,1
point camera cam,Object Position x(obj),Object Position y(obj),Object Position z(obj)
position camera cam,object Position x(obj)-200,object Position y(obj)+400,object Position z(obj)-200
endfunction