Page 6 of 9
Re: Dialogue For Split Screen Using a Gamepad
Posted: Sun May 16, 2021 4:24 pm
by Tony Li
That sounds like a config issue in your input actions asset.
Re: Dialogue For Split Screen Using a Gamepad
Posted: Sat May 22, 2021 1:33 pm
by Lockes_TheThief
I'm not sure why. Player 1 and 2 have the same Input working for them. I'm using the new unity input system.
Re: Dialogue For Split Screen Using a Gamepad
Posted: Sat May 22, 2021 2:48 pm
by Tony Li
Do other functions of Player 1's 'A' button, such as jumping, work while the joystick is neutral?
Are there any errors or warnings in the Console window?
Can you try backing up your project and updating to the latest version of the Input System package?
Re: Dialogue For Split Screen Using a Gamepad
Posted: Mon May 24, 2021 3:50 am
by Lockes_TheThief
I got almost all the controls of Player 1 working so far, except his dialogue. I tried working things around, but he doesn't continue the conversation with the NPC with the A button. I don't know why yet. All other controls work while neutral.
Re: Dialogue For Split Screen Using a Gamepad
Posted: Mon May 24, 2021 8:20 am
by Tony Li
Hmm, check what input is assigned to the Continue Button's UI Button Key Trigger / Player Input Button Hotkey in Player 1's dialogue UI. Maybe it's not reading the correct input action.
Re: Dialogue For Split Screen Using a Gamepad
Posted: Mon May 24, 2021 1:23 pm
by Lockes_TheThief
Nope, everything looks the same as Player 2's controls for the UI, whom is working. I do get this error whenever I interact with the NPC:
NullReferenceException: Object reference not set to an instance of an object
PlayerInputButtonHotkey.Update () (at Assets/TPC DS Test/Scripts/PlayerInputButtonHotkey.cs:25)
But that seems to be coming from the script I downloaded from you. It doesn't seem to relate to anything I'm doing in my own scene. It even happens when Player 2 interacts, but then she can still continue the conversation. No other errors are present.
Re: Dialogue For Split Screen Using a Gamepad
Posted: Mon May 24, 2021 2:46 pm
by Tony Li
Hi,
PlayerInputButtonHotkey assumes the Button is in a player's hierarchy, and that a parent GameObject (e.g., the root player GameObject) has a PlayerInput component somewhere up in the hierarchy. If it doesn't find one, then it won't work.
Re: Dialogue For Split Screen Using a Gamepad
Posted: Tue May 25, 2021 5:25 pm
by Lockes_TheThief
Okay. I also just noticed a couple of Player 1's input isn't working. I'm not sure why though. They both use controls from a single Unity Input System, so I don't know why they don't do the same things. I'll have to check all the Details in the Inspector to see if there is anything I might have missed...
Re: Dialogue For Split Screen Using a Gamepad
Posted: Fri May 28, 2021 9:11 pm
by Lockes_TheThief
Nope I was wrong. It is only his dialogue that isn't working. I have one bubble where the NPC (Sonya) speaks, and Player1 can't continue. I have to use Player2's button to continue. The response though, which is just the A button to say "Goodbye", works for Player1. I checked all the inputs for the Continue button and nothing is jumping out at me as wrong. It looks identical to Player 2. Except for the things that are supposed to be P1 and P2...
Darn, I was almost done with this so I could get to the Quest part. Thanks for helping me out so far and I will await your response.
Re: Dialogue For Split Screen Using a Gamepad
Posted: Fri May 28, 2021 9:34 pm
by Tony Li
Hi,
I set up a test scene:
TPC_DS_Test_Scene_Continue_Button_2021-05-28.unitypackage
Here's how it differs from the previous test scene:
1. Set the Dialogue Manager's Subtitle Settings > Continue Button mode to Always.
2. Modified the PlayerInputButtonHotkey script to let you assign an optional PlayerInput component. (If the script is in the player's hierarchy, no need to assign the PlayerInput component.)
3. Added continue buttons to the NPC P1 and NPC P2 subtitle bubbles. Configured PlayerInputButtonHotkey on both.