Page 1 of 1

Determine Last Node(s) of Conversation

Posted: Fri Oct 22, 2021 1:06 pm
by FredericoUnO
Hello again, Tony,

This question should hopefully be much simpler than my last one:

Is there any way to detect when you are at a [potential] final node in a conversation, i.e. one that's either a subtitle with no children or a response menu with at least one answer that has no children? Alternatively, is there a way to determine if a node has children within OnConversationLine()?

Basically, I want to programmatically make some changes just before a conversation ends (as in, before OnConversationEnd() is called). I could do this via sequence commands/scene events in those nodes within the gui, but it'd be more convenient to have a way to do it via code rather than editing the final node(s) in the same way in every conversation.

Re: Determine Last Node(s) of Conversation

Posted: Fri Oct 22, 2021 1:44 pm
by Tony Li
Hi,

Yes, you can check DialogueManager.currentConversationState. It has properties such as hasAnyResponses, hasPCResponses, etc., as well as the list of pcResponses and npcResponses.