Contact conversation extension

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
minomod
Posts: 89
Joined: Mon Jun 19, 2017 9:17 am

Contact conversation extension

Post by minomod »

- Dialogue > Conversations > Title > Plus
- Dialogue > Conversations > Title > Minus

1. If I press the Plus button in the UI, I want the dialogue to be activated.
2. If you press the minus button in the UI, it stops what was in front of the dialogue and wants the dialogue to appear.

I want to keep the conversation active and inactive each time the plus or minus button is pressed.

Is there a function to load a conversation with a script and disable it again?
User avatar
Tony Li
Posts: 20993
Joined: Thu Jul 18, 2013 1:27 pm

Re: Contact conversation extension

Post by Tony Li »

I don't understand. Are you asking about an editor feature? Or a runtime feature?

If you want to start a conversation from a script, use DialogueManager.StartConversation().

If you want to save the state of the conversation and then stop it, check DialogueManager.currentConversationState to record the current position somewhere. Then call DialogueManager.StopConversation() to stop the conversation.
minomod
Posts: 89
Joined: Mon Jun 19, 2017 9:17 am

Re: Contact conversation extension

Post by minomod »

There is an Ambassador Hello in Conversations.
Clicking NPC in the UI outputs Hello.
If you click the UI again, the dialogue does not appear.
(Last Check: It becomes True.)


I want to keep the same dialogue exposed whenever I click on it.
User avatar
Tony Li
Posts: 20993
Joined: Thu Jul 18, 2013 1:27 pm

Re: Contact conversation extension

Post by Tony Li »

Hi,

Are there any errors or warnings in the Console window?

Can you send an example to tony (at) pixelcrushers.com?
minomod
Posts: 89
Joined: Mon Jun 19, 2017 9:17 am

Re: Contact conversation extension

Post by minomod »

1. Turn on the object to start a conversation
2. If the object is turned OFF and then turned ON again, no conversation is displayed.
Attachments
1.png
1.png (117.12 KiB) Viewed 485 times
User avatar
Tony Li
Posts: 20993
Joined: Thu Jul 18, 2013 1:27 pm

Re: Contact conversation extension

Post by Tony Li »

Change the Dialogue System Trigger to OnEnable.

OnStart is only called once, when the component first starts in the scene. OnEnable is called whenever the component is enabled (or disabled and then re-enabled).
minomod
Posts: 89
Joined: Mon Jun 19, 2017 9:17 am

Re: Contact conversation extension

Post by minomod »

Thank you!
User avatar
Tony Li
Posts: 20993
Joined: Thu Jul 18, 2013 1:27 pm

Re: Contact conversation extension

Post by Tony Li »

Glad I could help! :-)
Post Reply