0
Under review

Dialogue conditions don't seem to block actions on the dialogue line

Pyro Game Studio 1 week ago in Dialogue updated 2 days ago 6

In the example below:

All the dialogue lines have conditions. However only the last 2 line have actions.

- The "You've returned with the box! Thank you!" dialogue has an action that sets a quest to completed.

- The "Thank you for all your help my friend!" dialogue has an action that sets the character gesture.

In this example all the conditions work perfectly and the dialogues are hidden when they're supposed to be.. however, when the "You've returned with the box! Thank you!" dialogue condition fails its action is still ran and I get this:

Basically the action is trying to set the quest: "return-to-naja" to complete, but it is already completed. Also when the "Thank you for all your help my friend!" dialogue condition fails, the gesture animation still plays even though the dialogue doesn't appear.

I'm using the latest version of the Dialogue module: 0.5.3

NOTE: I did find a work-around by placing the dialogue lines that have actions as a child of empty dialogue lines with no actions and giving those lines a quick autoplay of 0.5. This seems very hacky but it makes my dialogues work properly.

Unity version:
2019.3
Game Creator version:
1.0.4

Answer

Answer
Not a bug

Hi Pyro. What it's happening is intended by design. If a dialogue line Condition returns false ("You've returned with the box, thank you!") it won't display that line and any of its children. However, it will continue displaying sibling lines below.


The solution to this problem is, as you say at the end, placing the "Thank you for all your help friend" line as a child of the "you've returned with the box. Thank you" line. No need to create empty dialogue lines. So, from what you initially had, all you needed to do is drag the last line and drop it as a child of the "You've returned with the box, thank you" line.


Hope this helps!

Answer
Not a bug

Hi Pyro. What it's happening is intended by design. If a dialogue line Condition returns false ("You've returned with the box, thank you!") it won't display that line and any of its children. However, it will continue displaying sibling lines below.


The solution to this problem is, as you say at the end, placing the "Thank you for all your help friend" line as a child of the "you've returned with the box. Thank you" line. No need to create empty dialogue lines. So, from what you initially had, all you needed to do is drag the last line and drop it as a child of the "You've returned with the box, thank you" line.


Hope this helps!

Hi Marti, the main issue isn't so much with the sibling lines, I know I can shuffle those around. The problem is that the dialogues that conditions return false still run the actions attached to them. Is that happening by design also?

the "You've returned with the box, thank you!" has an action to complete a quest. That action should not run if the condition for that line is false. At least, that's how I thought it should work.

Under review

Correct, that shouldn't happen. Can you post a screenshot of the Condition? Just to make sure it isn't running, can you use the Condition under General that is called Simple Condition? And make it return false.

This will help by dismissing any issues coming from the Condition returning true.

Here is what the condition looks like. It is a Quest condition.

So I did what you suggested and switched to a simple condition and made it always return false. The actions attached to that dialogue line still run.

We are unable to reproduce what you mention. It works fine with all configuration options we've tried. Can you post screenshots that capture the entire Dialogue? Line by line, capture both the Message, Actions & Conditions. Otherwise we can't create the exact Dialogue you did.

Thanks again Marti for testing it. Just a heads up. I'm using 2019.3 (I know that's still considered beta) but I just wanted to make that known for when 2019.3 does become release ready.

Not sure if you've tested my issue in 2019.3