Input for Dialogue System when using Corgi
-
- Posts: 193
- Joined: Mon Jul 01, 2019 1:21 pm
Input for Dialogue System when using Corgi
Hi Tony. I'm having some issues getting input to work correctly in conversations.
I'm using DS with Corgi and trying to get the game to work well with both a keyboard and a controller.
Using an Xbox controller, 'A' both initiates a conversation and progresses through it (this is the desired behaviour). However, when using a keyboard, 'E' works to initiate the conversation, but then you need to press Enter to progress through it. This seems to be a weird behaviour and honestly I have no idea how I set it to do this in the first place.
These are my settings for Player1_Interact in the input manager, which I assume is what is being used here.
Do you have any idea what might be causing this or where to start fixing it?
Thanks for your help as always.
I'm using DS with Corgi and trying to get the game to work well with both a keyboard and a controller.
Using an Xbox controller, 'A' both initiates a conversation and progresses through it (this is the desired behaviour). However, when using a keyboard, 'E' works to initiate the conversation, but then you need to press Enter to progress through it. This seems to be a weird behaviour and honestly I have no idea how I set it to do this in the first place.
These are my settings for Player1_Interact in the input manager, which I assume is what is being used here.
Do you have any idea what might be causing this or where to start fixing it?
Thanks for your help as always.
Re: Input for Dialogue System when using Corgi
Hi,
Add a UI Button Key Trigger component to your subtitle panel's Continue Button GameObject. Set its Button Name to Player1_Interact
This way when the Continue Button is visible and you press the Player1_Interact input, it will click the Continue Button.
Add a UI Button Key Trigger component to your subtitle panel's Continue Button GameObject. Set its Button Name to Player1_Interact
This way when the Continue Button is visible and you press the Player1_Interact input, it will click the Continue Button.
-
- Posts: 193
- Joined: Mon Jul 01, 2019 1:21 pm
Re: Input for Dialogue System when using Corgi
Got it working, thanks so much Tony! Really appreciate your help as always.
-
- Posts: 193
- Joined: Mon Jul 01, 2019 1:21 pm
Re: Input for Dialogue System when using Corgi
One last thing - is there a way to get this working with the player's responses as well? I tried adding this component to the Response Button Template, but that seems to be making it press all the options at once (they all go into their "pressed" visual state).
Re: Input for Dialogue System when using Corgi
Hi,
Tick the Dialogue Manager GameObject's Input Device Manager component > Always Auto Focus checkbox.
Then map the 'e' key to the Submit input:
You'll probably need to add another entry for Submit since the first two will probably already have inputs assigned to Positive and Alt Positive.
Tick the Dialogue Manager GameObject's Input Device Manager component > Always Auto Focus checkbox.
Then map the 'e' key to the Submit input:
You'll probably need to add another entry for Submit since the first two will probably already have inputs assigned to Positive and Alt Positive.
-
- Posts: 193
- Joined: Mon Jul 01, 2019 1:21 pm
Re: Input for Dialogue System when using Corgi
Hi Tony, I made those changes, but I'm still getting the same issues unfortunately. With the new entry for Submit, it's gone back to requiring you to press Enter to both continue the conversation and select a response.
Do these settings appear right to you?
Do these settings appear right to you?
Re: Input for Dialogue System when using Corgi
Hi,
Apart from the Always Auto Focus checkbox, the Dialogue Manager's Input Device Manager component doesn't come into play when running conversations. It's all done through the EventSystem GameObject.
You're using Unity's built-in input manager, correct? Not the Input System package?
Apart from the Always Auto Focus checkbox, the Dialogue Manager's Input Device Manager component doesn't come into play when running conversations. It's all done through the EventSystem GameObject.
You're using Unity's built-in input manager, correct? Not the Input System package?
-
- Posts: 193
- Joined: Mon Jul 01, 2019 1:21 pm
Re: Input for Dialogue System when using Corgi
Hi Tony. Sorry, I should have checked that beforehand. The Input System is installed - although I'm not sure where it's having an effect, making changes to inputs in the Input Manager still has an effect, so it seems to be using both?
Maybe I could send you a repro?
Thanks again for your help, apologies for the confusion.
Maybe I could send you a repro?
Thanks again for your help, apologies for the confusion.
Re: Input for Dialogue System when using Corgi
Hi,
Yes, please send a reproduction project to tony (at) pixelcrushers.com along with the steps I should follow to reproduce the issue, what I should see if it's working correctly, and what I'll currently see.
Yes, please send a reproduction project to tony (at) pixelcrushers.com along with the steps I should follow to reproduce the issue, what I should see if it's working correctly, and what I'll currently see.
Re: Input for Dialogue System when using Corgi
This project uses the new Input System package. As you mentioned in your email, your EventSystem uses an Input System UI Input Module component, which means it doesn't read from Project Settings > Input Manager > Submit. The Input System UI Input Module component points to the Input System's DefaultInputActions. In DefaultInputActions, the Submit input is mapped to Keyboard > enter. That's why only the Enter key responds.
To make it also respond to the E key:
1. Locate the DefaultInputActions asset in Packages > Input System > InputSystem > Plugins > PlayerInput.
2. Alt+drag it into the Assets section to create a duplicate copy.
3. Assign the duplicate copy to your EventSystem's Input System UI Input Module.
4. Edit the duplicate. Click the "+" next to Submit, and add another binding for the "E" key. (Remember to click Save Asset at the top, or enable Auto-Save.)
To make it also respond to the E key:
1. Locate the DefaultInputActions asset in Packages > Input System > InputSystem > Plugins > PlayerInput.
2. Alt+drag it into the Assets section to create a duplicate copy.
3. Assign the duplicate copy to your EventSystem's Input System UI Input Module.
4. Edit the duplicate. Click the "+" next to Submit, and add another binding for the "E" key. (Remember to click Save Asset at the top, or enable Auto-Save.)