Resume NavMeshAgent on ending conversation
Posted: Thu Mar 07, 2024 3:51 pm
Hello again!
I'm using this Sequencer string to "pause" my Malbers AI NPC, when I kick off a conversation with them:
NavMeshAgent(stop,speaker);LookAt(listener); Camera(Medium Left,speaker,1);
This works a treat, however I'd like the NPC to resume their navigation once the conversation ends.
Can I do this with the Sequencer?
Many thanks!
EDIT:
I've tried using Dialog System Events for this. I've added a DialogSystemEvents component to my NPC, and hooked up the "OnConverstaionStart" and "OnConversationEnd" events to the NavMeshAgent "isStopped" public property. This works for the first time I have a conversation with the NPC. However, if I then start the conversation again, the events aren't invoked.
EDIT:
I'm wrong - the events ARE being invoked. It's the NavMeshAgent that's misbehaving!
I'm using this Sequencer string to "pause" my Malbers AI NPC, when I kick off a conversation with them:
NavMeshAgent(stop,speaker);LookAt(listener); Camera(Medium Left,speaker,1);
This works a treat, however I'd like the NPC to resume their navigation once the conversation ends.
Can I do this with the Sequencer?
Many thanks!
EDIT:
I've tried using Dialog System Events for this. I've added a DialogSystemEvents component to my NPC, and hooked up the "OnConverstaionStart" and "OnConversationEnd" events to the NavMeshAgent "isStopped" public property. This works for the first time I have a conversation with the NPC. However, if I then start the conversation again, the events aren't invoked.
EDIT:
I'm wrong - the events ARE being invoked. It's the NavMeshAgent that's misbehaving!