Here is my version, based on that i have found in the manual:
Code:
VECTOR* temp1;
function approach_target_angle(ENTITIY* target) {
    var sang1, sang2;
    int do1, do2;
    vec_set(temp1,target.x);
    if (NULL != vec_to_screen(temp1,camera)) {
        vec_set(temp1,target.x);
        vec_to_screen(temp1,camera);
        sang1=sign(512-temp1.x)*0.6;
        sang2=sign(400-temp1.y)*0.6;
    }
    else {
        camera.tilt=-10;
        sang1=1.5;
        sang2=0.0;
    }

    do1=do2=1;
    while (do1==1 || do2==1) {
        if(temp1.x>515 || temp1.x<505)
            camera.pan += sang1;
        else
            do1=0;

        if(temp1.y>405 || temp1.y<395)
            camera.tilt += sang2;
        else

            do2=0;

        vec_set(temp1,target.x);
        if (NULL != vec_to_screen(temp1,camera)) {
            vec_set(temp1,target.x);
            vec_to_screen(temp1,camera);
            sang1=sign(512-temp1.x)*0.6;
            sang2=sign(400-temp1.y)*0.4;
        }
        else {
            camera.tilt=-10;
            sang1=1.5;
            sang2=0.0;
        }
        wait(1);
    }
}


You can refine or modify the values as you like.
sang1 and sang2 values control the speed of the camera moving.