OK! So far this is working great! I just need one thing more if someone can help. The NPC is walking smoothly along the path. Fantastic! But he does not step down if the ground suddenly lowers (like at a curb's edge). Instead, he keeps walking as if floating 6" in the air. He will step UP to get over something, but then, once to the other side, stay at that height and continue to float right along. What do I need to add to my code to make the NPC step down and up when the level geometry varies?

Here is my code so far (thanks to Superku!):

Code:
action follow_path_smooth() {
	my.skill1 = 1; //start with first node
	path_getnode(my,my.skill1,my.skill2,NULL);
	while(1) {
		
		// close to node => get position of next node
		my.skill4 = my.z;
		if(vec_dist(my.skill2,my.x) < 16) {
			my.skill1 = path_nextnode(my, my.skill1, 1);
			path_getnode(my,my.skill1,my.skill2,NULL);
		}
		
		// turn to next node
		vec_diff(my.skill5,my.skill2,my.x);
		vec_to_angle(my.skill8,my.skill5);
		
		my.pan += clamp(ang(my.skill8-my.pan)*0.25,-5,5)*time_step;
		
		c_move(me,vector(2*time_step,0,0),nullvector,GLIDE | IGNORE_PASSABLE);
		ent_animate(me, "walk", walk_percentage, ANM_CYCLE); 
		walk_percentage += 4 * time_step;
		
		wait(1);
	}
}



Thanks again for all the help!