Page 1 of 1

Contact conversation extension

Posted: Mon Jun 22, 2020 6:04 pm
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?

Re: Contact conversation extension

Posted: Mon Jun 22, 2020 8:17 pm
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.

Re: Contact conversation extension

Posted: Mon Jun 22, 2020 10:58 pm
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.

Re: Contact conversation extension

Posted: Tue Jun 23, 2020 7:58 am
by Tony Li
Hi,

Are there any errors or warnings in the Console window?

Can you send an example to tony (at) pixelcrushers.com?

Re: Contact conversation extension

Posted: Tue Jun 23, 2020 9:38 am
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.

Re: Contact conversation extension

Posted: Tue Jun 23, 2020 9:48 am
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).

Re: Contact conversation extension

Posted: Tue Jun 23, 2020 5:32 pm
by minomod
Thank you!

Re: Contact conversation extension

Posted: Tue Jun 23, 2020 8:17 pm
by Tony Li
Glad I could help! :-)