Hi!

I’m stuck with a path problem (3 roads to follow) .
I have 3 paths (at least 9 nodes each) that are close .
First entity uses path_1, second uses path_2 , third uses path_3...
They use the paths at different times and have a starting WORLD POSITION near the node 1 of their assigned path.
Here’s the code :
Code:
// all global variables
ENTITY* mo2sn_d;
ENTITY* eNouv_son;
VECTOR* vNodepos= {x=0;y=0;z=0;}
VECTOR* vTem_angle = {pan=0;tilt=0;roll=0;}
VECTOR* vAngle = {pan=0;tilt=0;roll=0;}
var _Distancej4 = 0;
var node = 1 ;
function move_on_right_path ()
{
var _temp_d = 0;
node = 1;
path_set(mo2sn_d, "right_road"); //defined in WED
_Resultat = path_scan (mo2sn_d,mo2sn_d.x,mo2sn_d.pan,vector(360,180,1000));
if (0 == _Resultat) {return;}
path_setnode (mo2sn_d, 1, vNodepos.x, 0);//is it NULL or 0
while (_temp_d <= 20)
{
vec_set(eNouv_son.x, mo2sn_d.x); // follow entity mo2sn_d
if (_temp_d <= 10) // 12 nodes - 2 bouts = 10 sections
{
// path_spline (mo2sn_d,mo2sn_d.skill[1],_Distancej4 );
// _Distancej4 += 2*time_step ;
path_getnode (mo2sn_d, node, vNodepos.x ,0);//NULL
node = path_nextnode(mo2sn_d,node, 0);//NULL
path_getnode (mo2sn_d,node, vNodepos, 0);//NULL
}
vec_set(vTem_angle,vector (40*time_step,0,0));
vec_rotate (vTem_angle,vAngle );
vec_add (mo2sn_d.x, vTem_angle);
}
}
Question no 1 : What changes to the code will give a smoother movement?
Question no 2 :
The Entity that uses path_2(center path) loses it’s way on the path (goes up instead of sideways and down).
What changes to the code will ensure that the entities will follow only their assigned path?