Setting up continue button for corgi engine

Announcements, support questions, and discussion for the Dialogue System.
Ramezov
Posts: 19
Joined: Sat Jun 02, 2018 4:26 am

Setting up continue button for corgi engine

Post by Ramezov »

Hello,

I just got Dialogue System yesterday to integrate it with corgi engine, I checked the example scene and it is awesome, the only thing I need is to force continue button, i tried to follow the instructions in the link below
http://www.pixelcrushers.com/dialogue_s ... inueButton
but I couldn't understand them well or apply them to the corgi engine scene maybe cuz it is a special case or maybe cuz I'm not used yet to the Dialogue System.
here is what I did:
  • Open Corgi Example
  • On the Dialogue Manager GameObject, set Subtitle Settings > Continue Button to Always.
  • expanded "Dude-DS1" clicked on its DialogueUI
  • Assigend Response Button Template to Continue Button field in "Override Unity UI Dialogue Control" in Subtitle section
  • Clicked on Response Button Template inside "Dude-DS1" assigned Generic Unity UI Dialogue UI to on click event there and selected "UnityUIDialogueUI.OnContinueConversation"
  • Selected Generic Unity UI Dialogue UI under Dialogue Manager gameobject > under Response menu I Set Buttons Size to 1 and Assigned "Response Button Template " from the previous step.
  • Tested the scene and it didn't work :oops:

I hope someone guide me to the proper way, thanks in advance,

Regards
Ramez
User avatar
Tony Li
Posts: 22056
Joined: Thu Jul 18, 2013 1:27 pm

Re: Setting up continue button for corgi engine

Post by Tony Li »

Hi,

Thanks for buying the Dialogue System!

Here's an example scene: DS_CorgiDialogueUIContinueButtonExample_2018-06-02.unitypackage

I only set up Dude1 and Dude2.

The Corgi integration works a little differently. Each NPC has its own DialogueUI child GameObject that has an Override Unity UI Dialogue Controls component. This component overrides the controls that are on the Dialogue Manager's regular dialogue UI (e.g., Generic Unity UI Dialogue UI in the example scene).

This means you need to add a continue button to the NPC's DialogueUI and assign it to the NPC's Override Unity UI Dialogue Controls component.

In the example scene, I set up Dude1 like this:

1. Expanded Dude-DS1 > ConversationZone > DialogueUI > Panel > TextPanel. Added an new UI button named "Continue Button".

2. Added a Unity UI Continue Button Fast Forward component to the button. Pointed the Dialogue UI field to the Dialogue Manager's Unity UI Generic Dialogue UI. Pointed the Typewriter Effect field to the Subtitle Line. Then I configured the button's OnClick() event to call UnityUIContinueButtonFastForward.OnFastForward. You only need to do these steps if you want to fast-forward the typewriter. If you instead want the continue button to immediately skip to the next line even if the typewriter is still typing, don't add this component. Point the OnClick() event directly to the Unity UI Generic Dialogue UI's OnContinue method.

3. Added a UI Button Key Trigger component to make the 'A' key a hotkey for the button. You can also assign an input button such as the joystick 'B' button if you want.

4. Assigned the continue button to the NPC's Overide Unity UI Dialogue Controls > Continue Button field.

5. Finally, just as you did, I set the Dialogue Manager's Subtitle Settings > Continue Button mode to Always.
Ramezov
Posts: 19
Joined: Sat Jun 02, 2018 4:26 am

Re: Setting up continue button for corgi engine

Post by Ramezov »

wow, that is awesome thank you so much.
I still have 1 matter before I able to continue developing my game, is it possible to make a conversation between the player and NPC in corgi engine like in the bark example scene ? I want when the player texts to pop above him and the NPC texts pops above his head. if I analysed the bark example scene I can apply that to corgi engine ? or there must be a special treatment for that case ?

Many thanks again :)
User avatar
Tony Li
Posts: 22056
Joined: Thu Jul 18, 2013 1:27 pm

Re: Setting up continue button for corgi engine

Post by Tony Li »

You can do this with barks but, since it sounds like you want a back-and-forth conversation, a real conversation is probably better.

Here's an example scene: DS_CorgiDialogueUIBarks_2018-06-02.unitypackage

Here's how I set it up:

1. Made a copy of the player prefab, and copied Dude1's DialogueUI to it. Repositioned it slightly since the player is shorter.

2. Added an Override Actor Name to the player prefab, and set the name to "Player".

3. Created a new dialogue database with one conversation. Clicked on empty canvas space to edit the conversation's properties. Ticked:
  • Override Display Settings > Subtitle Settings > Show PC Subtitles During Line (so PC's lines will show above head)
  • Override Display Settings > Subtitle Settings > Continue Button mode to Never (optional)
  • Override Display Settings > Input Settings > UNticked Always Force Response Menu
Ramezov
Posts: 19
Joined: Sat Jun 02, 2018 4:26 am

Re: Setting up continue button for corgi engine

Post by Ramezov »

Thanks Tony , you are the best , I never faced such a support in my life :D i will do 5 stars review on Unity store ;)
User avatar
Tony Li
Posts: 22056
Joined: Thu Jul 18, 2013 1:27 pm

Re: Setting up continue button for corgi engine

Post by Tony Li »

Glad to help!
Ramezov
Posts: 19
Joined: Sat Jun 02, 2018 4:26 am

Re: Setting up continue button for corgi engine

Post by Ramezov »

I've been experimenting since yesterday and found the following:
  • In "Conversation Zone"Limiting the number of activation is not working , I disabled "Unlimited activations" and set max number of activations to 1 but you can still activate the Converstaion Zone limitless.
  • I added a bool to the "Conversation Zone" called "Activated" and wanted to set it true when conversation ends. I placed the code "Activated = true;" in "OnConversationEnd" also tried to place it in " OnConversationStart" also tried in "TriggerButtonAction" but that doesn't change the bool value , I wonder where should I place it.
User avatar
Tony Li
Posts: 22056
Joined: Thu Jul 18, 2013 1:27 pm

Re: Setting up continue button for corgi engine

Post by Tony Li »

Hi,
Ramezov wrote: Sun Jun 03, 2018 7:16 amIn "Conversation Zone"Limiting the number of activation is not working , I disabled "Unlimited activations" and set max number of activations to 1 but you can still activate the Converstaion Zone limitless.
Make sure you're using the Dialogue System's ConversationZone script and not Corgi's built-in DialogueZone script. The Dialogue System's ConversationScript script didn't have an Activations section yet, but I just added it. You can download the updated Corgi Support package on the Dialogue System Extras page. It does one better than Corgi's DialogueZone. You can optionally configure it to record a dialogue database variable so it will remember the activation in saved games and scene changes. Corgi's DialogueZone script resets its value whenever you load the scene.
Ramezov
Posts: 19
Joined: Sat Jun 02, 2018 4:26 am

Re: Setting up continue button for corgi engine

Post by Ramezov »

after I imported the updated Corgi Support package I got the following errors:

Assets/Dialogue System/Third Party Support/Corgi Support/Scripts/ConversationZone.cs(67,33): error CS0117: `PixelCrushers.DialogueSystem.DialogueManager' does not contain a definition for `isConversationActive'


Assets/Dialogue System/Third Party Support/Corgi Support/Scripts/ConversationZone.cs(101,35): error CS0117: `PixelCrushers.DialogueSystem.DialogueDebug' does not contain a definition for `logWarnings'
User avatar
Tony Li
Posts: 22056
Joined: Thu Jul 18, 2013 1:27 pm

Re: Setting up continue button for corgi engine

Post by Tony Li »

It sounds like you downloaded the DS2_CorgiSupport package. Since you're using version 1.x, please download and import the DS1_CorgiSupport package.
Post Reply