Thanks for reply but the canon keeps spinning real fast,

i tried it with the function below to test and see what the targets where...

none of the targets are moving so the canon should now face the closest target but it just spins like > crazy

Code:
action act_boat()
{
    VECTOR temp;
    VECTOR testvec;
    
    while(1)
    {
        if(!you)
        {
            c_scan(my.x,my.pan,vector(360,360,10000),SCAN_ENTS | SCAN_LIMIT | IGNORE_ME | IGNORE_FLAG2);
            beep();
            wait(-1);
        }
        else
        {
            if(key_del == 1)
            {
                beep();
                ent_remove(you);
            }
            else
            {
                vec_set(temp.x, you.x);
                vec_sub(temp.x, testvec.x);
                vec_to_angle(testvec.x, temp.x);
                ent_bonerotate(my, "canon", testvec);    
            }
        }
      wait(1);
    }
}