I would do something like this:
all floats
all floats
x=entityx(player)+sin(entityyaw(player)+180)*10 y=entityy(player)+4 z=entityz(player)+cos(entityyaw(player)+180)*10 xc=entityx(camera) yc=entityy(camera) zc=entityz(camera) xc=(xc+(x-xc))/5 yc=(yc+(y-yc))/5 zc=(zc+(z-zc))/5 positionentity camera,xc,yc,zc pointentity camera,player while (camerapick(graphicswidth()/2,graphicsheight()/2)<> player) and (entitydistance(camera,player)>2) moveentity camera,0,0,.5 positionentity camera,entityx(camera),entityy(player)+4,entityz(camera) pointentity camera,player wend ...