I have done some more changes in the code now:
I can now make it stop near the place the mouse clicks. But I cant get it to move several times. When I try to click more times , the player only turns but dont moves.

How to make the player moves everytime I click somewhere with the mouse?
And how can I add the mouse_map to my code?


Code:
VECTOR temp;
vec_zero(temp);
function point_mouse()
{
mouse_mode = 2;

//mouse_map = arrow;
  while(1)
  {

  temp.x = mouse_pos.x;
  temp.y = mouse_pos.y;
  temp.z = 1000;
  vec_for_screen(temp,camera);
  c_trace(camera.x,temp,IGNORE_ME);
  		if(hit.x != NULL)
  		vec_set(my.x,hit.x);
  	
  		wait(1);
  		}
}

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



A6 and A7 Commercial
-------------------
Programmer always searching for more to learn and understand. smile