Dialogue For Split Screen Using a Gamepad

Announcements, support questions, and discussion for the Dialogue System.
Lockes_TheThief
Posts: 41
Joined: Tue Apr 13, 2021 11:46 pm

Re: Dialogue For Split Screen Using a Gamepad

Post by Lockes_TheThief »

Huh...I tried my game again and it isn't crashing anymore. Maybe something was up with my hardware. I can't get the bubble to face either/or screen though and the menu is still spanning across the screen
User avatar
Tony Li
Posts: 22051
Joined: Thu Jul 18, 2013 1:27 pm

Re: Dialogue For Split Screen Using a Gamepad

Post by Tony Li »

Here are two things to check for the menu panels:

1. Each player's menu panel is assigned to its Dialogue Actor component, and the Use For dropdown is set to Me And Responses To Me:

splitMenuPanel1.png
splitMenuPanel1.png (130.45 KiB) Viewed 1329 times

2. Each menu panel's Canvas is set to Screen Space - Camera, and the player's camera is assigned to it. So Player 1's camera should be assigned to Player 1's Canvas, and Player 2's camera should be assigned to Player 2's Canvas.

splitMenuPanel2.png
splitMenuPanel2.png (70.91 KiB) Viewed 1329 times
---

For the issue with getting the bubble to face the player, are there any errors in the Console window?

If there are no errors, temporarily set the Dialogue Manager's Other Settings > Debug Level to Info. Then play the scene and start the conversation with one of the players. Look for a line similar to this in the Console window:

Dialogue System: Starting conversation 'New Conversation 1' with actor=XXX and conversant=NPC

XXX should be the player that interacted with the NPC (Player1 or Player). Is that the case?

Also check these:
  • Is the Face Player On Conversation Start on the NPC GameObject?
  • Is the Bubble Template Standard UI Subtitle Panel assigned to it?
  • On the Bubble Template Standard UI Subtitle Panel GameObject itself, is the Always Face Camera component disabled or removed? Face Player On Conversation Start will handle the rotation, so Always Face Camera should be disabled or removed.
Lockes_TheThief
Posts: 41
Joined: Tue Apr 13, 2021 11:46 pm

Re: Dialogue For Split Screen Using a Gamepad

Post by Lockes_TheThief »

My gameobjects are set up that way.
panel1.gif
panel1.gif (413.24 KiB) Viewed 1327 times
panel2.gif
panel2.gif (398.94 KiB) Viewed 1327 times
I got two errors, also I'm not too great on coding, very beginner level actually, so I don't know exactly how to fix them. Here they are:

1. Error: There is no look source attached to the character. Ensure the character has a look source attached. For player characters the look source is the Camera Controller, and AI agents use the Local Look Source.

2. NullReferenceException: Object reference not set to an instance of an object PlayerInputButtonHotkey.Update ()
menu1.gif
menu1.gif (362.96 KiB) Viewed 1327 times
Lockes_TheThief
Posts: 41
Joined: Tue Apr 13, 2021 11:46 pm

Re: Dialogue For Split Screen Using a Gamepad

Post by Lockes_TheThief »

It's gotta be something with my project itself. I have the unity package you gave me in my project and the menu issue happens the same (player 2 talks to NPC but the menu response appears on player 1 screen). It doesn't happen on the separate project you gave me in the DM.
User avatar
Tony Li
Posts: 22051
Joined: Thu Jul 18, 2013 1:27 pm

Re: Dialogue For Split Screen Using a Gamepad

Post by Tony Li »

Feel free to send a copy of your project to tony (at) pixelcrushers.com. (Instructions to package it.) I don't mind taking a look.
Lockes_TheThief
Posts: 41
Joined: Tue Apr 13, 2021 11:46 pm

Re: Dialogue For Split Screen Using a Gamepad

Post by Lockes_TheThief »

Okay, I'm packaging it now and will send it to you
Lockes_TheThief
Posts: 41
Joined: Tue Apr 13, 2021 11:46 pm

Re: Dialogue For Split Screen Using a Gamepad

Post by Lockes_TheThief »

Okay, I'm not seeing any immediate problems right now. Thanks for the help! Do I need to create a new topic in the Quest System to continue with what we are doing? I want to come up with a way to make a quest for one or both of the characters, depending on the circumstances.
User avatar
Tony Li
Posts: 22051
Joined: Thu Jul 18, 2013 1:27 pm

Re: Dialogue For Split Screen Using a Gamepad

Post by Tony Li »

Up to you! We can continue it here to retain the context of your split screen setup, or feel free to create a new thread in the Quest Machine section if you want to focus on multiplayer quests without the baggage of this thread.
Lockes_TheThief
Posts: 41
Joined: Tue Apr 13, 2021 11:46 pm

Re: Dialogue For Split Screen Using a Gamepad

Post by Lockes_TheThief »

I don't mind continuing here. So, I want to start the game with the two players in separate locations, given quests by two different NPCs.

There will be the one we've been working on, in Red (Sonya the Sage). She will give The Muse her quest to gather some herbs so the Sages can make a potion for a sick child while avoid or fighting the Sneaks that have infiltrated the area. After she has gathered enough herbs, she is to meet Sonya at a Quest House (where I want Sonya to warp to after completing the quest).

Then there will be a new NPC, (Juice the Sneak). He will give The Thief a quest to steal information from that same area, which I want to be in the form of books or something in houses and libraries. Once they finish their quests, the NPCs tell them to go somewhere that I'll put on my map, where they will run into each other at a spot in the game, which will make it into a 2 player co-op.

Oh last, is it possible for the two players to be able to talk to each other? Like, say you press the Action button as player 1 towards player 2, would I be able to give the players dialogue they can say to one another?
User avatar
Tony Li
Posts: 22051
Joined: Thu Jul 18, 2013 1:27 pm

Re: Dialogue For Split Screen Using a Gamepad

Post by Tony Li »

Lockes_TheThief wrote: Wed Apr 28, 2021 5:33 pmSo, I want to start the game with the two players in separate locations, given quests by two different NPCs.

There will be the one we've been working on, in Red (Sonya the Sage). She will give The Muse her quest to gather some herbs so the Sages can make a potion for a sick child while avoid or fighting the Sneaks that have infiltrated the area. After she has gathered enough herbs, she is to meet Sonya at a Quest House (where I want Sonya to warp to after completing the quest).
Will the Quest House be in the same Unity scene or a different one?
Lockes_TheThief wrote: Wed Apr 28, 2021 5:33 pmThen there will be a new NPC, (Juice the Sneak). He will give The Thief a quest to steal information from that same area, which I want to be in the form of books or something in houses and libraries. Once they finish their quests, the NPCs tell them to go somewhere that I'll put on my map, where they will run into each other at a spot in the game, which will make it into a 2 player co-op.
Since it's split screen, do you plan for both players to always be in the same Unity scene? Or will you be additively loading and unloading additional scenes based on where each player goes?

Can The Thief talk to Sonya the Sage and pick up the herb quest? If not, how do you want to gate it? Allow only one player to accept the quest and prevent The Muse from leaving the area until she accepts it? Play different conversations on The Sage depending on whether The Muse or The Thief initiates conversation?
Lockes_TheThief wrote: Wed Apr 28, 2021 5:33 pmOh last, is it possible for the two players to be able to talk to each other? Like, say you press the Action button as player 1 towards player 2, would I be able to give the players dialogue they can say to one another?
What kind of dialogue? Individual barks? Or conversation trees with choices?
Post Reply