Aaargh, this is confusing. You are right, it should work, but it doesn't.

I keep having a panel on the radar visible, and it'll simply stop moving, frozen in place.
It must be some sort of pointer problem. I'm only calling the g3_radar code once at the start of the enemy's funktion, off course outside of his while loop.
Edit: The distance to the player is still within the range, doesn't that cause the problem and make it still create a new panel for the radar?
Code:
function g3_handle_radar {
while(!playerrr){wait(1);}
while(me) {
if(vec_dist(my.x,playerrr.x) < make_scan.z) {
pan_temp = pan_create("bmap = bmp_radar_enemy; flags = visible,refresh,filter;",101);
my.skill92 = handle(pan_temp);
while(vec_dist(my.x,playerrr.x) < make_scan.z) {
pan_temp = ptr_for_handle(my.skill92);
vec_set(temp,playerrr.x);
vec_sub(temp,my.x);
vec_to_angle(my.skill97,temp);
my.skill98 = vec_dist(my.x,playerrr.x); //was camera
pan_temp.scale_x = 0.50-my.skill98/(make_scan.z*2); //1.5
pan_temp.scale_y = pan_temp.scale_x;
pan_temp.pos_x = rader.pos_x+80-my.skill98/(make_scan.z*1.2/100)*sin
//pos_x+96 -> nu 85 , 75
(camera.pan-my.skill97)-16*pan_temp.scale_x;
pan_temp.pos_y = rader.pos_y+70+my.skill98/(make_scan.z*1.2/100)*cos
(camera.pan-my.skill97)-16*pan_temp.scale_x;
//solving bug problem
//
//dots appear at the edges .. fixed ni
//
if(pan_temp.pos_x - rader.pos_x < 25){break;}
if(pan_temp.pos_y - rader.pos_y < 25){break;}
if(pan_temp.pos_x - rader.pos_x > 100){break;}
if(pan_temp.pos_y - rader.pos_y > 100){break;}
//if(me==null){beep; pan_temp.visible = off;break;}
wait(1);
}
pan_temp = ptr_for_handle(my.skill92);
pan_remove(pan_temp);
}
my.skill92 = 0;
wait(1);
}
if(my.skill92==0){beep;return;}
wait(1);
}
This doesn't beep when my enemy is dead and removed strangely enough. It should beep, right?
Cheers