New to Unity and the Dialogue System

Announcements, support questions, and discussion for the Dialogue System.
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: New to Unity and the Dialogue System

Post by Tony Li »

Sounds good! If you have questions at any point, just let me know. I'll be very happy to help.
UnWrecker
Posts: 13
Joined: Thu Jul 21, 2016 6:29 am

Re: New to Unity and the Dialogue System

Post by UnWrecker »

I think I'll annoy you soon)

I'm sorry for silly questions. But I have another one)
How can I start the second conversation in the same location after first? I need to add a Condition to [END] node?

For example: I talk to someone in "France" and quit conversetion and get back to "WorldMap". If I'll go again to "France" there we'll be another conversation.

And how can I change backgrounds in different conversations? I just made an Image inActive, which activates with button.
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: New to Unity and the Dialogue System

Post by Tony Li »

UnWrecker wrote:How can I start the second conversation in the same location after first? I need to add a Condition to [END] node?

For example: I talk to someone in "France" and quit conversation and get back to "WorldMap". If I'll go again to "France" there we'll be another conversation.
Here's one way: Add another variable, for example "FranceVisited", and set its initial value to false. Add two Conversation Triggers, one for each conversation. In the first Conversation Trigger, set a Condition that FranceVisited is false. In this conversation, use a Script field to set FranceVisited to true. In the second Conversation Trigger, set a Condition that FranceVisited is true. Let me know if you'd like me to post example screenshots.
UnWrecker wrote:And how can I change backgrounds in different conversations? I just made an Image inActive, which activates with button.
You can use the SetActive() sequencer command to activate or deactivate GameObjects such as images. Use it in the Sequence field of a dialogue entry node.
UnWrecker
Posts: 13
Joined: Thu Jul 21, 2016 6:29 am

Re: New to Unity and the Dialogue System

Post by UnWrecker »

Tony Li wrote:Let me know if you'd like me to post example screenshots.
I think I need help... I used boy/girl conversation in this example.
I've made Veriable:
1.jpg
1.jpg (25.67 KiB) Viewed 1814 times
And made two ConversetionTriggets:
2.jpg
2.jpg (54.04 KiB) Viewed 1814 times
And the script at the end of 1st conversation:
3.jpg
3.jpg (64.38 KiB) Viewed 1814 times
But it doesn't work...

Maybe i need to do something with button OnClick() that leads to BoyConv 1, but not to BoyConv2.
UnWrecker
Posts: 13
Joined: Thu Jul 21, 2016 6:29 am

Re: New to Unity and the Dialogue System

Post by UnWrecker »

Also I tried to paste Save/Load Slot system from VN Framework, and it doesn't work, too...
I think I too stupid for this things and dont understand plane things.
error.jpg
error.jpg (128.69 KiB) Viewed 1813 times
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: New to Unity and the Dialogue System

Post by Tony Li »

Hi,

There's just some learning curve. Once you get it set up, you'll be able to write lots of conversations easily -- and that's the fun part. :-)

For the first problem, there's a typo. Your Conversation Trigger's Condition is this:

Code: Select all

Variable["BoyConv1Completed"] = true
but it should be this:

Code: Select all

Variable["BoyConv1Completed"] == true
Notice the two equals signs ( == ). In the future, it's easier to use the Lua Condition Wizard:

1. Click the "+" button under "Lua Condition Wizard".
2. Select Variable > BoyConv1Completed > True.
3. Click the Apply button.


I'll take a look at the save slot issue in the VN Framework and get back to you later today. What version of Unity are you using?
UnWrecker
Posts: 13
Joined: Thu Jul 21, 2016 6:29 am

Re: New to Unity and the Dialogue System

Post by UnWrecker »

Unfortunately it still doesn't work...

I think there's a trouble in Button that leads to Conversetion, because there's only one Conversetion on it.
OnClick.jpg
OnClick.jpg (15.79 KiB) Viewed 1813 times
Maybe the better choice is to change Button On Click function with the end of first conversetion? If there'll be a lot of conversetions I'll need a lot of COnversetionTriggers for each of them. That's not rational.

Maybe, if I cant change On Click on one Button, i can realize that the first Button leading to Conversetion 1 becomes inActive, and the second Button that leads to Conversetion 2 becomes Active?
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: New to Unity and the Dialogue System

Post by Tony Li »

Maybe a better way is to do the switching inside the dialogue database. Here's how you could do that:

1. Create a conversation named "MainBoyConv". Keep your BoyConv and BoyConv2 conversations also.

2. In MainBoyConv, create two child nodes from START. In the child nodes, set the Sequence to "None()" and link them to the first dialogue entry node in BoyConv or BoyConv2. Add conditions so the Dialogue System will follow the correct node. The MainBoyConv conversation will be set up like this:
  • START
    • (Child Node 1)
      Sequence: None()
      Condition: Variable["BoyConv1Completed"] == false
      Links to: (Another conversation) BoyConv > first node
    • (Child Node 2)
      Sequence: None()
      Condition: Variable["BoyConv1Completed"] == true
      Links to: (Another conversation) BoyConv2 > first node
To link to another conversation (BoyConv or BoyConv2), click on one of the child nodes in MainBoyConv. In the Inspector view, from the "Link to:" dropdown select "Another conversation". Then you can select the conversation (e.g., BoyConv) and the node to link to.

3. Don't configure any Conversation Triggers. You don't need them.

4. On your Button, set the OnClick() event to run DialogueSystemController.StartConversation > MainBoyConv.
UnWrecker
Posts: 13
Joined: Thu Jul 21, 2016 6:29 am

Re: New to Unity and the Dialogue System

Post by UnWrecker »

Thank you very much, now it works!

I'll still will be glad to have your help with Save Slots.
Or maybe you can suggest another Save/Load System?
I saw this guide https://www.youtube.com/watch?v=19yiQ_g ... e=youtu.be, but it using SaveLoadFSM, I didn't find it.
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: New to Unity and the Dialogue System

Post by Tony Li »

Happy to help! I'm glad it works now.

I'll reply back later today after checking the VN Framework's save slots.
Post Reply