Hello Sir.
As suggested earlier, a remedy to avoid weird looping of camera/player animations, is to tune the Animator States and conditions manually. That definitely did solve the issue and now, there are no more weird states when conversation starts!
That works like a charm!
Tony Li wrote: ↑Tue Nov 03, 2020 8:45 am
You could add a world space canvas to the NPC. Example:
- Add a world space canvas to the NPC.
- Add a UI Button to the canvas.
- Configure the UI Button to call the Dialogue System Trigger's OnUse method.
- Set the canvas inactive.
- Configure the NPC's Usable component's OnSelected() UnityEvent to activate the canvas.
- Configure the NPC's Usable component's OnDeselected() UnityEvent to deactivate the canvas.
- Set the NPC's Dialogue System Events > OnConversationStart() UnityEvent to deactivate the canvas.
Thank You very much for providing the steps! Your help is much appreciated Sir! I would surely try that out.
Tony Li wrote: ↑Tue Nov 03, 2020 8:45 am
If you stop the game while a conversation is active, then when you play the game again the Conversation State Saver will resume the conversation where it left off. If you don't want this to happen, you must remove the Conversation State Saver.
Ummm.. I have some doubts here. Apologies for the trouble!
First, would Auto Save Component itself keep a track of conversation states?
(If not, then I suppose Conversation State Saver would be required.)
Now, as per my workflow,
I do require conversation states to be saved.
But based upon what you said above,
are you intending to say that if Conversation State Saver component would be used, it would "automatically resume the conversation where it left off", on game being loaded after stopping?
Currently, my NPC's Dialogue System Trigger is configured to "OnUse", which has a an action of Starting the conversation.
Though, Conversation State Save component does start conversation from where it left off, when game is loaded again.
But is there any way by which automatic starting of conversation, from where it left off, could either be delayed or be configured, to start from where it left off, "OnUse", and not automatic (start conversation no matter whether player has chose to converse or not)?
Next, I also have some instances, where I trigger some Scene Events, when certain node in conversation is reached.
In my conversation,
at a desired node in my conversation in Dialogue Editor, I have set up a Scene Event, where I pass the "Dialogue Manager" object and set it's "DialogueSystemController.Pause" method.
Actually, I am triggering some UI components which are set up in external, world canvas. And what I want, is the conversation to NOT proceed, unless certain action from those UI components are conducted. So, what I do is, when the desired node in conversation is reached, I have a Scene Event created in the Dialogue System Editor itself, which contains one event to Pause the Dialogue System Controller as mentioned above, and another event, which would activate the target UI component. The target UI component, which would be activated using that Scene Event, has a button whose "OnClick()" is configured to "DialogueSystemController.Unpause".
Every single thing till here, is working as intended, when
game is run for the FIRST time (never ever been saved, fresh 1st start).
Now, if that particular node (where Pause and Unpause events are set up) is NOT yet reached, when game is running in it's first instance and the game is stopped, then those events configured earlier (which involve Pause & Unpause and triggering of UI components) are skipped entirely, when the game is loaded again!
Ideally, if that particular node of conversation has not yet been reached in first instance, and game is stopped, then, when the game is loaded again, it should be traversed.
In this case, desired node is reached, but the events associated to it, do NOT take place, and are skipped completely, when game is loaded again.
Please note that when I test this above mentioned scenario, my Dialogue Manager has Auto Save Load and Conversation State Components, attached to it.
If I'm doing anything wrong above, and If there is any alternative approach of doing what I require, I would surely be open to try that out.
Your help is much appreciated Sir. Can't thank you enough!