Code:
if(vec_dist(my.x,vec_next_node.x) < 80) 
		{    
			if(pathSetNum == 1) // whatever path is set here does not allow monster to
			{



If this 80 is to large, you can end up reading 4 and 3 in a frame or two. Try,
if(vec_dist(my.x,vec_next_node.x) < my.max_x*1.5)
or
if(vec_dist(my.x,vec_next_node.x) <my.max_x-my.min_z)

if this ->DEBUG_VAR(my.NODE_NEXT,500);

jumps from 4 to 1 , you know it works however it sees 2-3 faster then the human eye. Again pointing use to the vec_dist check

Edit _> before it changes direction make sure you see 4 in-> DEBUG_VAR(my.NODE_NEXT,500); and then confirm the next number is 2, also confirm it never changes to 1.
Debugging and troubleshooting, it's a art form, after years you begin to just feel it. Of course debugging in a forum post is a pain, however a few years of it can make you excellent at hunting down problems.
Mal

Mal


Last edited by Malice; 11/14/15 21:46.