How can I get back to the dialogue node.

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
User avatar
Stalker_EG
Posts: 31
Joined: Sun Jul 07, 2019 7:57 pm

How can I get back to the dialogue node.

Post by Stalker_EG »

Good afternoon.
An example:
There is a sequence of conversation nodes.
I want to refer to another conversation node in one of the nodes.
Is it possible go back to the node from which I moved?
Without specifying it directly in the link?
So that I can use this nested dialog in different conversations.
I hope you can understand me. Thank you in advance for your answer.
User avatar
Tony Li
Posts: 22055
Joined: Thu Jul 18, 2013 1:27 pm

Re: How can I get back to the dialogue node.

Post by Tony Li »

Hi,

Yes. The Dialogue System has a conversation position stack You can push the current position onto the stack and then later pop it off the stack to return to it.

Use PushConversationPosition() in the Script field before going into your nested conversation. Then use PopConversationPosition() at the end of the nested conversation to return to the pushed position.
User avatar
Stalker_EG
Posts: 31
Joined: Sun Jul 07, 2019 7:57 pm

Re: How can I get back to the dialogue node.

Post by Stalker_EG »

As always, it's very simple...
The dialogue system is a powerful tool.
It takes a lot of time to study it completely.
Thank you for the answer! And for this tool!
User avatar
Tony Li
Posts: 22055
Joined: Thu Jul 18, 2013 1:27 pm

Re: How can I get back to the dialogue node.

Post by Tony Li »

Thanks! And glad to help!
User avatar
Tony Li
Posts: 22055
Joined: Thu Jul 18, 2013 1:27 pm

Re: How can I get back to the dialogue node.

Post by Tony Li »

Remember to push the position before the node that goes to the nested conversation. Otherwise it will return to that node and then go back to the nested conversation.

For example, if the NPC says, "What do you want to talk about?" and the player has 3 responses that go to different nested conversations, push the NPC's line, not the player's responses. When you pop, it will return to the NPC's line.
User avatar
Stalker_EG
Posts: 31
Joined: Sun Jul 07, 2019 7:57 pm

Re: How can I get back to the dialogue node.

Post by Stalker_EG »

Tell me, does it not work with group nodes?
if I'm Push in a group node, then when I do Pop it brings me back to the nearest non-group node.
The fact is that I often use the group node as a place of "decision making".
I have found a way out of using [nosubtitle] instead of a group node.
But I just wanted to know if it was meant to be or if it was an error.
Thank you in advance.
User avatar
Tony Li
Posts: 22055
Joined: Thu Jul 18, 2013 1:27 pm

Re: How can I get back to the dialogue node.

Post by Tony Li »

That's a good point. The push/pop doesn't work with group nodes because of the way they're evaluated and bypassed. I'll see if it's possible to add support for push/pop of group nodes in a future version.
Post Reply