Code:
action car(){

	track_select=random(2);; // GLOBlE NOTICE
	//if(track_select >2)
	//track_select = 1;
	if(integer( track_select) ==0)
	path_set(my,"path_000");
	if(integer( track_select) ==1)
	path_set(my,"path_001");
	
	/////////////////////////////////////////////////////////////////////
	
	my.NODE_NEXT=path_nextnode(my,1,1); // SET THE NODE
	while(1)
	{
         // PATH NODE DETECTION AND RANDOMIZATION AND FACING //////////////////////////////////
		
		
		if(vec_dist(my.x,vec_next_node.x) < my.max_x)    
		{
                  // HERE you have to adjust the code REALSPAWN
                  if(my.NEXT_NODE == 10) // replace 10 with the number for the last node, inside the cheese
                   ent_remove(me);
   
			//path_next(my); // will jump from current path to new path// Jump to new path
			my.NODE_NEXT=path_nextnode(my,my.NODE_NEXT,1); // Grab Next node on new path -- NOTE ALL PATHS MUST HAVE THE SAME NUM NODE IN SAME GEN LOCATION
			
		}
		
		path_getnode(my,my.NODE_NEXT,vec_next_node,NULL);  // Get next node actual vector location 
		
		
			vec_to_angle(my.pan,vec_diff(NULL,vec_next_node,my.x)); // face the new node
		

		///////////////////////////////////////////////////////////////////////////
		
		// SOFT AND HARD MOVEMENTs /////////////////////////////////////////////////////////////
		
		c_move(my,vector(my.skill3*time_step,0,0),nullvector,GLIDE | IGNORE_PASSABLE);
		
wait(1);
}
}



test and play with this. This does seem to work but the ent_remove will cause a crash.


Last edited by Malice; 08/29/15 23:42.