I think the error may be in the path_setter() function itself.

This is the path_setter() function I am using right now:

Code:
action path_setter()
{
   VECTOR vec_next_node;

   path_set(my,"path_001");
	
   if(pathSetNum == 1)
   {
      my.NODE_NEXT=path_nextnode(my,1,1); // SET THE NODE
   }

   if(pathSetNum == 2)
   {	
      my.NODE_NEXT=4; // SET THE NODE
   }

   while(1)
   {
      // PATH NODE DETECTION AND FACING //////////////////////////////////
		
      if(vec_dist(my.x,vec_next_node.x) < 80) 
      {    
         if(pathSetNum == 1) 
         {
            my.NODE_NEXT=path_nextnode(my,my.NODE_NEXT,1); // Grab Next node on 
         }
	 if(pathSetNum == 2) 
	 {
	    my.NODE_NEXT-=1; // NODE GOES DOWN TO 3, BUT THEN JUMPS BACK UP TO 
                             //    4.
         }
      }
		
      path_getnode(my,my.NODE_NEXT,vec_next_node,NULL);  
         // Get next node - actual vector location
         // I BELIEVE THE ERROR IS HAPPENING HERE, PROBABLY WITH vec_next_node
	
      vec_to_angle(my.pan,vec_diff(NULL,vec_next_node,my.x)); // face the new 
                                                              //    node

      DEBUG_VAR(my.NODE_NEXT,500);
		
      wait(1);
   }
}



I think the error may lie with "vec_next_node". When NODE_NEXT decrements from 4 to 3, it quickly increments back up to 4 instead of staying at 3, and keeps quickly jittering back and forth between 3 and 4, while the monster is within the general vicinity of node 4 and not traveling anywhere.

I think "vec_next_node" is identifying node 4 as the next node vector location from node 3 even when NODE_NEXT is decrementing; when vec_next_node should really stay at node 3 until the monster actually relocates to node 3, to which NODE_NEXT should decrement again to node 2, and so on.

Last edited by Ruben; 11/15/15 11:33.