Page 5 of 9

Re: Dialogue For Split Screen Using a Gamepad

Posted: Thu May 13, 2021 9:08 am
by Tony Li
The Escape key is the Dialogue Manager's Input Settings > Cancel Subtitle Input. I recommend setting Cancel Subtitle Input and Cancel Conversation Input > Key to None.

Add a UI Button to each player's dialogue UI. Add a UI Button Key Trigger, and specify an input action such as the action that maps to joystick's d-pad south button. Configure the Button's OnClick() event to call the dialogue UI's OnContinueConversation method. (Alternatively, if you want the first click to fast forward the typewriter effect, add a StandardUIContinueButtonFastForward component, assign its fields, and set OnClick() to call its OnFastForward method.) Finally, assign the Button to the dialogue UI subtitle panel's Continue Button field.

---
Lockes_TheThief wrote: Thu May 13, 2021 12:36 am By the way, I chose the single dialogue system that is supposed to check which gameobject is interacting with it. But I don't eem to have it working properly yet, as both characters can still communicate with Sonya.
I don't understand. Can you provide details and/or screenshots of your setup?

Re: Dialogue For Split Screen Using a Gamepad

Posted: Fri May 14, 2021 6:01 pm
by Lockes_TheThief
I'm not exactly sure how to make the button you were talking about.

Ask for the details, you told me:
1. Two Dialogue System Triggers that play different conversations. Set Conditions > Accepted GameObjects on one to The Thief, and on the other to The Muse.

2. Or a single Dialogue System Trigger that starts a single conversation. The conversation can check which player is talking and branch accordingly.

I'm trying to go for the single dialogue system trigger that branches off depending on who is talking to the NPC.

Re: Dialogue For Split Screen Using a Gamepad

Posted: Fri May 14, 2021 6:31 pm
by Tony Li
Now that I refresh my memory of how your UI is set up, it's a little more complicated. The NPC currently uses a bubble subtitle panel that isn't tied to any specific player.

I'm going to suggest a solution that works better with #1 (Two Dialogue System Triggers that play different conversations. Set Conditions > Accepted GameObjects on one to The Thief, and on the other to The Muse.) The NPC will use two bubble subtitle panels, one for the thief and another for the muse.

Try this:

1. Add two more actors to your database, named something like NPC For Thief and NPC For Muse.

2. Add two empty child GameObjects to NPC.
  • Add a Dialogue Actor to each. Set one to NPC For Thief and the other to NPC For Muse.
  • Add an instance of the Bubble Template Standard UI Subtitle Panel to each child. (I'll call this the bubble subtitle panel from now on.)
  • Set the bubble subtitle panel's Canvas > Event Camera to the thief's camera on one and the muse's camera on the other.
  • On both Dialogue Actors, set Subtitle Panel Number to Custom, and assign its child bubble subtitle panel.
3. Set up two Dialogue System Triggers on NPC.
  • On one, set Conditions > Accepted GameObjects to the thief. Assign the NPC For Thief child GameObject as the Conversation Conversant.
  • On the other Dialogue System Trigger, set Conditions > Accepted GameObjects to the muse. Assign the NPC for Muse child GameObject as the Conversation Conversant.
Make sure that works, without continue buttons for now. Once you've confirmed that works:
  • Add a UI Button to each bubble subtitle panel's Bubble Panel.
  • Configure the UI Button's OnClick() event to call the bubble subtitle panel's StandardUISubtitlePanel.OnContinue method.
  • Add a Player Input Button Hotkey component. Set it to an input action such as "Jump" (the gamepad 'A' button).
  • Assign the UI Button it to the bubble subtitle panel's Continue Button field.

Re: Dialogue For Split Screen Using a Gamepad

Posted: Fri May 14, 2021 10:02 pm
by Lockes_TheThief
That seemed to cause some problems so I must be missing something. Do I change The Thief and Muse Player Character's Dialogue Actors to the NPC for The Thief and NPC for The Muse Actors that I made? There were already Actors for them, so I'm supposed to change those, right? And in the accepted game objects do I set them to the Player characters or the NPC actors you told me to make? I was confused by the wording.

When I set things up so far, The Thief still got the conversation for The Muse, and The Muse didn't get a conversation at all. Also the ability to choose a response for the player is gone. I followed everything step by step.

Re: Dialogue For Split Screen Using a Gamepad

Posted: Fri May 14, 2021 10:35 pm
by Tony Li
Hi,

Here's an example.

TPC_DS_Test_Scene2_2021-05-14.unitypackage

The main NPC GameObject is configured like this:
tpcSplit1.png
tpcSplit1.png (66.81 KiB) Viewed 890 times

The child GameObjects are configured like this:
tpcSplit2.png
tpcSplit2.png (124.6 KiB) Viewed 890 times

It's set up like I described above, except I didn't hook up continue buttons. Once you get your scene working, and if you have questions about the continue button after that, I can add continue buttons to the example.

Re: Dialogue For Split Screen Using a Gamepad

Posted: Sat May 15, 2021 4:35 am
by Lockes_TheThief
Right on. I was able to get the dialogue to be different following your pattern. Now The Thief and The Muse get different conversations!

I do have an issue though:

Even though the speech bubbles are cool, I can't find a way to hide all of my UI items when using them. The UIs are blocking the conversations. Maybe a regular speech box will have to do...unless there is a way to hide it all easily. On the converse ability for the Opsive Ultimate Character Controller, I have Hide UI selected, but it is only hiding my health, stamina and magic, but not my minimap and currency UIs. I think this is because the minimap uses a different asset from UCC and the Currency uses Opsives Ultimate Inventory System. If it is too hard to hide them all, I'm okay with switching the dialogue to bottom of the screen like normal. But if there is a simple solution, I would rather continue using the bubbles.

Re: Dialogue For Split Screen Using a Gamepad

Posted: Sat May 15, 2021 8:19 am
by Tony Li
Hi,

If you inspect your players' Converse ability and tick 'Hide UI', it will hide the TPC UI. (Hide UI is ticked by default.) To hide the other UIs during conversations, add a Dialogue System Events component to the player. Configure the OnConversationStart() event to hide the UIs. The easiest way is to disable the player's UI canvas(es). Configure OnConverrsationEnd() to show the UIs again.

Re: Dialogue For Split Screen Using a Gamepad

Posted: Sat May 15, 2021 7:34 pm
by Lockes_TheThief
Looks like that is working now, all the UIs are hidden. Thank you! Now back to the continue button. I set it up like in the instructions from before but it still seems to be going at its own pace instead of waiting for me to press my Action button. Not sure what I missed, so I attached images.

Re: Dialogue For Split Screen Using a Gamepad

Posted: Sat May 15, 2021 7:51 pm
by Tony Li
Hi,

Inspect the Dialogue Manager GameObject, and set the Subtitle Settings > Continue Button dropdown to Always.

Re: Dialogue For Split Screen Using a Gamepad

Posted: Sun May 16, 2021 3:56 pm
by Lockes_TheThief
Cool, almost got it working. I'm not sure why, but Player 1's (The Thief), continue button only works if I press A while using the joystick. If the joystick is in neutral it doesn't continue the conversation. Player 2's (The Muse) continue button works fine. It is almost done! Thanks.