The
while(mouse_left == 1) {wait(1);}
is waiting till the mousebutton is release from selecting the units, that code is right.

EDIT:
following line in selected_unit() is false:
vec_set(my, you);
should be:
vec_set(my.x, you.x);



Last edited by Widi; 07/02/10 18:47.