How to directly check the conversation end before linked conversation start and get it's title?
Posted: Mon Aug 03, 2020 9:25 pm
I used two conversation in one masterbase.and then I use conversation 1's node's end to link the other converstaion's Start.
I would like to know when the conversation 1's node end happen and get the title to do somthing.
Are there one direct way to get that?
I had a idea to deal that,such like using dialugue system event's "OnConversationLineEnd "to get every ConversationState,and then in "OnLinkedConversationStart" to get last conversation.
code is like :
in OnConversationLineEnd
in OnLinkedConversationStart
It could get last conversation's title and just late one line conversation to do something.But that's not realy what I want.I want to get the end before the linked conversation start.
Are there one better way to get that?
I would like to know when the conversation 1's node end happen and get the title to do somthing.
Are there one direct way to get that?
I had a idea to deal that,such like using dialugue system event's "OnConversationLineEnd "to get every ConversationState,and then in "OnLinkedConversationStart" to get last conversation.
code is like :
Code: Select all
PixelCrushers.DialogueSystem.ConversationState[] cArray = new PixelCrushers.DialogueSystem.ConversationState[2];
int cArrayCount=0;
Code: Select all
cArray[cArrayCount%2] =PixelCrushers.DialogueSystem.DialogueManager.CurrentConversationState;
cArrayCount++;
Code: Select all
int lastIndex=0;
if(cArrayCount % 2==0)
{
lastIndex=1;
}
Debug.Log(PixelCrushers.DialogueSystem.DialogueManager.MasterDatabase.GetConversation(cArray[lastIndex].subtitle.dialogueEntry.conversationID).Title);
Are there one better way to get that?