Page 2 of 2

Re: Wait for NavMeshAgent to move to position

Posted: Fri Jun 10, 2022 10:42 am
by Tony Li
Aha, that should be easy to solve. Change your Sequence from:

Code: Select all

NavMeshDestination(Alfonso, Gramps)
to:

Code: Select all

NavMeshDestination(Alfonso, Gramps)->Message(Arrived);
Continue()@Message(Arrived)
Also, in your custom sequencer command, you might want to add an OnDestroy() method that makes sure the NavMeshAgent is at its destination position in case the player clicks the continue button early.

If you don't want the player to be able to click the continue button during the navigation, you can change the sequence to:

Code: Select all

SetContinueMode(false);
NavMeshDestination(Alfonso, Gramps)->Message(Arrived);
required SetContinueMode(true)@Message(Arrived);
Continue()@Message(Arrived)

Re: Wait for NavMeshAgent to move to position

Posted: Fri Jun 10, 2022 3:51 pm
by hidingso
Tony, you are a hero!

Glad I did a bit of a dive into the custom sequencer commands. It's seemingly possible to do pretty much anything with them!

Re: Wait for NavMeshAgent to move to position

Posted: Fri Jun 10, 2022 4:23 pm
by Tony Li
Glad to help. Sequencer commands are definitely handy, and faster and more compact to set up than interactive sequencers like Timeline.