How do select a dialogue option by pressing a specific button?
How do select a dialogue option by pressing a specific button?
Hello. I'm using a modified version of your standard wheel UI. I've reduced the the dialogue options from 6 to 4. I'm making this game specifically to work with a gamepad, and I want the answer options to be selected by pressing the corresponding button on the d-pad. I'm using Unity's new input system. I haven't been able to figure how to do this. Any help is greatly appreciated.
- Attachments
-
- Screen Shot 2020-11-12 at 3.50.07 PM.png (59.27 KiB) Viewed 216 times
Re: How do select a dialogue option by pressing a specific button?
Hi,
A common configuration is similar to The Walking Dead for consoles:
To set that up, assign all 4 buttons to the StandardUIMenuPanel's Buttons list. Since you've modified the Wheel prefab, they should already be assigned. Make a note of each button's element number so you can use it in [position=#] markup tags any time you want to. Bioware games often do this, putting "good" and "evil" responses in specific positions.
Next, add a UI Button Key Trigger to each button. Assign an input button name to each one (e.g., "JoystickButton0", "JoystickButton1", etc).
Finally, define those input button names in new Input System, and set up the Dialogue System's new Input System integration. Select menu item Tools > Pixel Crushers > Dialogue System > Welcome Window, and tick the NEW_INPUT_SYSTEM checkbox and set up a small script as directed in the Input_Device_Manager.pdf located in Plugins / Pixel Crushers / Common / Documentation.
A common configuration is similar to The Walking Dead for consoles:
To set that up, assign all 4 buttons to the StandardUIMenuPanel's Buttons list. Since you've modified the Wheel prefab, they should already be assigned. Make a note of each button's element number so you can use it in [position=#] markup tags any time you want to. Bioware games often do this, putting "good" and "evil" responses in specific positions.
Next, add a UI Button Key Trigger to each button. Assign an input button name to each one (e.g., "JoystickButton0", "JoystickButton1", etc).
Finally, define those input button names in new Input System, and set up the Dialogue System's new Input System integration. Select menu item Tools > Pixel Crushers > Dialogue System > Welcome Window, and tick the NEW_INPUT_SYSTEM checkbox and set up a small script as directed in the Input_Device_Manager.pdf located in Plugins / Pixel Crushers / Common / Documentation.