Tried that one, like this
if(vec_dist(my.x,temp)<=(my.max_x + my.max_z) * 1.2) //def 1
But it isent there the problem is . Because when I set it like this:
if(variabel_1 ==0)//deff 0
{
if(vec_dist(my.x,temp)<=1) //def 1
{
variabel_1 = 1;//def 1
}
c_move(me,vector(10*time_step,0,0),nullvector,IGNORE_ME|IGNORE_PASSABLE|GLIDE);
}
It does what it is supposed to: Go to where I clicked with the mouse. It does that, and stops at it is supposed to. But when I whant the player to go to the next point, the player turns toward the place I pointed but dosent move..... So it gets to the "turning" code....but not loonger....
So I think I must have some kind of test , to see if the variabel_1 is changed and when I click again, it shall al start over...... like
return or something like that we use in other programming languages.