What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal
RebornBuddy Forums

Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

movement from navigation within a coroutine task

iyake

Member
Joined
Oct 19, 2014
Messages
143
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.
 
Back
Top