Code:
action player_mouseAct(){
	c_setminmax(me);
	var variabel_1 = 0;
	
	VECTOR temp; vec_zero(temp);
	ANGLE my_angle; vec_zero(my_angle);
	while(1){
		
		if(mouse_left==1){
			variabel_1 = 1;
			vec_set(temp,mouse_pos3d.x);//mouse_pos
			vec_sub(temp,my.x);
			vec_to_angle(my_angle,temp);
			my.pan = my_angle.pan;
			vec_set(temp,mouse_pos3d.x);
			temp.z = my.z;
		}
		if(variabel_1 == 1) {
			if(vec_dist(my.x,temp)<=0.5) {
				variabel_1 = 0;
			} else {
				c_move(me,vector(10*time_step,0,0),nullvector,IGNORE_ME|IGNORE_PASSABLE|GLIDE);
			}
		}		
		wait(1);
	}
	
}