Hi there!
I just realized the existence of "onLinkedConversationStart" on the DialogueSystemEvents, but after triggering it, the variable DialogueManager.lastConversationStarted still returns the original conversation name, before the linked one.
> Is there any way I can get the LinkedConversation name when listening to onLinkedConversationStart?
That's my only question.
"A linked conversation started." Which one?
Just some context of my use case:
That would help with a custom questing system we have for our necessities. Each quest that can be completed in the current scene has an object in the scene with components to advance the quest, that way is easier to search where progression happens, and I have a script that advances a quest after a certain conversation has been completed, but when the conversation only triggers through a linked conversation, then I can't detect it.
Thanks in advance!
Get linked conversation name onLinkedConversationStart
-
- Posts: 6
- Joined: Fri Aug 04, 2023 11:20 am
Re: Get linked conversation name onLinkedConversationStart
Hi,
Code: Select all
void OnLinkedConversationStart(Transform actor)
{
int linkedConversationID = DialogueManager.currentConversationState.subtitle.dialogueEntry.conversationID;
string title = DialogueManager.masterDatabase.GetConversation(linkedConversationID).Title;
Debug.Log($"Changed to linked conversation {linkedConversationID}: '{title}'");
}
-
- Posts: 6
- Joined: Fri Aug 04, 2023 11:20 am
Re: Get linked conversation name onLinkedConversationStart
It worked!Tony Li wrote: ↑Thu Jul 25, 2024 12:19 pm Hi,
Code: Select all
void OnLinkedConversationStart(Transform actor) { int linkedConversationID = DialogueManager.currentConversationState.subtitle.dialogueEntry.conversationID; string title = DialogueManager.masterDatabase.GetConversation(linkedConversationID).Title; Debug.Log($"Changed to linked conversation {linkedConversationID}: '{title}'"); }
Thank you very much.