I swear there was a topic about this here some time ago! Cant find it now though...
Check distance from current target and compare with old distance check, check for effects that might hold you in place. If no effects and distance unchanged, do something.
Basically that was how it was solved in the topic I mentioned, however if the mob gets "stuck" moving between some random points... You might want to compare the distance between the two check points or add additional check points to be compared...
Meh, too many vectors... Do tell if you figure out some better way.
EDIT
I seriously edited this post like 7 times fixing my typos.
Modifié par Xardex, 23 septembre 2011 - 05:29 .