I'm using: Code: while (await CommonTasks.ExecuteCoroutine(CommonBehaviors.MoveAndStop(ret => Location, 5f, true, null, RunStatus.Failure))) { await (Coroutine.Sleep(100)); } and it more or less works but it feels clunky and I'm a bit worried about the 100 ms sleep hitting the nav server too often. Is there a better way?
You wanna call that as often as possible. Nav requests are only sent out when the path target changes otherwise its in control of rotating your character and making sure your moving onto the next spot. I'm not even sure that needs to be in a while loop.
I tried it without the sleep and it locked up my ffxiv client. I tried it with a longer delay and it caused pathing issues. I've settled on 50 after what you said and it's working fine now. Also, wrapping a the moveandstop behavior into a task with executecoroutine and then wrapping that into a behavior with a runactioncoroutine so we can insert that behavior into the tree is correct? It feels like too many layers of abstraction to me, and I'm a java developer.