Questions around Custom Speech Bubbles

Announcements, support questions, and discussion for the Dialogue System.
michaelheiml
Posts: 46
Joined: Thu Nov 08, 2018 5:47 am

Re: Questions around Custom Speech Bubbles

Post 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.
michaelheiml
Posts: 46
Joined: Thu Nov 08, 2018 5:47 am

Re: Questions around Custom Speech Bubbles

Post 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?
michaelheiml
Posts: 46
Joined: Thu Nov 08, 2018 5:47 am

Re: Questions around Custom Speech Bubbles

Post 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").
Attachments
random node.jpg
random node.jpg (213.64 KiB) Viewed 775 times
User avatar
Tony Li
Posts: 22055
Joined: Thu Jul 18, 2013 1:27 pm

Re: Questions around Custom Speech Bubbles

Post 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.
michaelheiml
Posts: 46
Joined: Thu Nov 08, 2018 5:47 am

Re: Questions around Custom Speech Bubbles

Post 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
User avatar
Tony Li
Posts: 22055
Joined: Thu Jul 18, 2013 1:27 pm

Re: Questions around Custom Speech Bubbles

Post 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.
michaelheiml
Posts: 46
Joined: Thu Nov 08, 2018 5:47 am

Re: Questions around Custom Speech Bubbles

Post by michaelheiml »

Hi Tony, thanks for the patch, it works!
User avatar
Tony Li
Posts: 22055
Joined: Thu Jul 18, 2013 1:27 pm

Re: Questions around Custom Speech Bubbles

Post by Tony Li »

Glad to help!
Post Reply