i did try put it in the for loop. but doesnt work. the agents dont move at all now. and sudden movements are there.

code:

for (k=0; k<agent_count; k++)
{


vec_set(temp,vector(toAgent[k].xpos, toAgent[k].ypos, 2.8));
vec_sub(temp,vector(fromAgent[k].xpos, fromAgent[k].ypos, 2.8));
vec_to_angle(fromAgent[k].entAgent.pan,temp);

distance = vec_dist(vector(toAgent[k].xpos, toAgent[k].ypos, 0), vector(fromAgent[k].xpos, fromAgent[k].ypos, 0));

while(anim_percent < 100)
{

c_move(fromAgent[k].entAgent, vector(distance, 0, 0), nullvector, IGNORE_WORLD | IGNORE_MODELS | IGNORE_PASSABLE);

//animate
anim_percent += 5 * time_step;
ent_animate(fromAgent[k].entAgent, "walk", anim_percent, ANM_CYCLE);
//saving values
wait(1);
}
anim_percent = 0;
fromAgent[k].xpos = toAgent[k].xpos;
fromAgent[k].ypos = toAgent[k].ypos;


}

wait(-0.1);

Last edited by delinkx; 09/04/08 03:35.

A7 commercial Team / VC++ 2008 Pro
homepage | twitter | facebook