Page 2 of 2

Re: Questions around Custom Speech Bubbles

Posted: Thu Feb 27, 2020 9:41 am
by michaelheiml
Thanks Tony, that was the problem. There was a Variable "Alert", it had InitialValue "Default", no description and Type "Emotion" (a Custom Field Type). There is no string that could be empty or not, but removing this Variable Entry solves the problem.

Re: Questions around Custom Speech Bubbles

Posted: Thu Feb 27, 2020 10:26 am
by michaelheiml
Hey Tony,

another question, this time about RandomizeNextEntry()

I have:
1. Dialogue Start Node linked to
2. "Empty Node" with Sequence "RandomizeNextEntry();Continue()" linked to
3. 3 child nodes

- "Empty Node" Randomize should pick one of the 3 child nodes, the node itself should be skipped/has no text
- as I understood Continue() it skips the node and advances to the next one

(I refer to this forum question: https://www.pixelcrushers.com/phpbb/vie ... dom#p13718
and to https://www.pixelcrushers.com/dialogue_ ... eNextEntry)

However, it's always the first node of (3) that is shown. Only if I remove "Continue()" in Sequence of node (2), a random node of (3) gets picked, but then node (2) is "shown" (a blank dialogue for like half a second).

I tried split "Continue()" (Sequence field) and "RandomizeNextEntry()" (Script field) or swap Sequence to "Continue();RandomizeNextEntry()" but that does not solve the issue.

How do I have to setup (2) "Empty Node" so it picks a random successor + does not output itself?

Re: Questions around Custom Speech Bubbles

Posted: Thu Feb 27, 2020 10:57 am
by michaelheiml
Minor Update to the question concerning RandomizeNextEntry()

- Random pick does work only if "Script" is "RandomizeNextEntry()" and "Sequence" is empty
- If "Script" is "RandomizeNextEntry()" and "Sequence" is "Continue()" it only skips the node and shows the first of 3 linked nodes
- If "Sequence" is "RandomizeNextEntry();Continue()" it only skips the node and shows the first of 3 linked nodes
- If "Sequence" is only "RandomizeNextEntry()" it does not randomize the next entry ("Check" validates OK and if I understand https://www.pixelcrushers.com/dialogue_ ... eNextEntry right it should also work to put "RandomizeNextEntry()" to either the "Sequence" field or the "Script" field?

I've attached a screenshot of the dialogue graph and the "Random Node" selected, which has no speaker assigned and no dialogue text.

I start the whole dialogue by calling "DialogueManager.StartConversation("Compass", null, null, testSentence);" where "Compass" = the name of the dialogue and "testSentence" = 8 (the ID of the "Random Node")

The 3 subnodes have a speaker assigned ("Eduard").

Re: Questions around Custom Speech Bubbles

Posted: Thu Feb 27, 2020 8:46 pm
by Tony Li
Hi Michael,

I put together a test scene, and I wasn't able to reproduce the issue:

DS_TestRandomizeNextEntry_2020-02-27.unitypackage

I exported it from Unity 2019.2, Dialogue System 2.2.4.

Would you please compare the test scene to your own scene/conversation?

Feel free to send your scene to tony (at) pixelcrushers.com. I'll be happy to take a look directly.

Re: Questions around Custom Speech Bubbles

Posted: Fri Feb 28, 2020 3:48 am
by michaelheiml
Hi Tony,

thanks for the test scene. I've tried it (Unity 2019.3) and it works as expected with no problem.

I've checked against my setup and noticed a slight difference that is likely causing the issue.

Since it would be quite tricky to export and send that part of the project to you, I've changed your test scene so the setup is the same as in my project.

The same issue now occurs in the changed test setup.

It seems the issue happens because I have several "Random" paths and call
DialogueManager.StartConversation(p_conversation, null, null, p_entryID);
using varying p_entryID (see test setup; 1 for path 1 and 5 for path 2).

When you import the package and start the scene, notice that it's always the first of the 3 sentences of both paths that is played.

Please find the file here:

http://www.michaelheiml.net/Unity/unity ... itypackage

Re: Questions around Custom Speech Bubbles

Posted: Fri Feb 28, 2020 12:07 pm
by Tony Li
Thank you for the reproduction scene. I just messaged you a patch. The fix will also be in version 2.2.5.

Re: Questions around Custom Speech Bubbles

Posted: Thu Mar 05, 2020 4:41 am
by michaelheiml
Hi Tony, thanks for the patch, it works!

Re: Questions around Custom Speech Bubbles

Posted: Thu Mar 05, 2020 8:07 am
by Tony Li
Glad to help!