Hello, Tony!
I’d like the NPC to say a random goodbye line at the end of a conversation. To achieve this, I created a conversation called "Goodbye," where the START dialogue entry connects to N different goodbye entries. I’ve used RandomizeNextEntry() in the Sequence of the START dialogue entry of this Goodbye conversation, and I have the last dialogue entry of each of the A, B, and C conversations linked to the START entry of the Goodbye conversation.
However, during testing, this setup consistently displays only the first goodbye line instead of randomizing. I’ve tried adding an intermediary dialogue entry and experimenting with Continue() and other commands, but these approaches haven’t worked. Currently, the only workaround I see is to add N links from the last entry in each initial conversation to each goodbye entry, but this approach is quite time-consuming. Could you kindly advise on a more efficient way to set up the Conversation for this purpose? Thanks!
Link to a START entry with RandomizeNextEntry
Re: Link to a START entry with RandomizeNextEntry
Hi,
The <START> node doesn't run sequences. (Hence the yellow warning and the requirement to click an Accept button before you can edit it.) However, it does run Script fields. You can move RandomizeNextEntry() to the <START> node's Script field. Or you can make a group node between <START> and the random nodes, and make your cross-conversation link to that group node.
You may also want this patch:
DS_ModelPatch_2024-10-24.unitypackage
It fixes an issue where a group node with RandomizeNextEntry() in the Script field links to exactly two nodes. This fix will also be in 2.2.50.
The <START> node doesn't run sequences. (Hence the yellow warning and the requirement to click an Accept button before you can edit it.) However, it does run Script fields. You can move RandomizeNextEntry() to the <START> node's Script field. Or you can make a group node between <START> and the random nodes, and make your cross-conversation link to that group node.
You may also want this patch:
DS_ModelPatch_2024-10-24.unitypackage
It fixes an issue where a group node with RandomizeNextEntry() in the Script field links to exactly two nodes. This fix will also be in 2.2.50.
Re: Link to a START entry with RandomizeNextEntry
Hi, I've tried placing RandomizeNextEntry() in the script section of the <START> node, but it’s not working—it still only displays the first dialogue entry. Additionally, could you explain a bit more about group nodes?
Re: Link to a START entry with RandomizeNextEntry
Here's an example scene:
DS_TestLinkToRandom_2024-10-25.unitypackage
Here's info about group nodes: Group Nodes
(The Dialogue System uses the same data format as Chat Mapper, so I linked to the Chat Mapper manual.)
DS_TestLinkToRandom_2024-10-25.unitypackage
Here's info about group nodes: Group Nodes
(The Dialogue System uses the same data format as Chat Mapper, so I linked to the Chat Mapper manual.)
Re: Link to a START entry with RandomizeNextEntry
After carefully reviewing the example, I discovered that I had "Stop Evaluation At First Valid" checked, which was causing things to not work as expected.
Thank you very much for the help!
Thank you very much for the help!
Re: Link to a START entry with RandomizeNextEntry
Glad to help!