Page 1 of 1

How can I get back to the dialogue node.

Posted: Wed Feb 26, 2020 2:58 am
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.

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

Posted: Wed Feb 26, 2020 8:18 am
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.

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

Posted: Wed Feb 26, 2020 8:40 am
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!

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

Posted: Wed Feb 26, 2020 9:06 am
by Tony Li
Thanks! And glad to help!

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

Posted: Wed Feb 26, 2020 9:08 am
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.

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

Posted: Thu Mar 12, 2020 3:54 am
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.

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

Posted: Thu Mar 12, 2020 8:19 am
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.