Scroll dialogue boxes by pressing 'Space' key

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
ytrevor
Posts: 5
Joined: Wed Jun 15, 2022 11:22 pm

Scroll dialogue boxes by pressing 'Space' key

Post by ytrevor »

I'm new to the dialogue system and I'm confused on how to show only one conversation dialogue box at a time, then changing to the next box on the player's input. At the moment an npc conversation scrolls through all dialogue in a conversation automatically, but I'm confused on how to change to the next line of conversation by pressing "Space" key.

Any ideas on how to do this? Thanks!
User avatar
Tony Li
Posts: 22148
Joined: Thu Jul 18, 2013 1:27 pm

Re: Scroll dialogue boxes by pressing 'Space' key

Post by Tony Li »

Hi,

Thanks for using the Dialogue System!

You'll want to tell the Dialogue System to use a continue button.

1. Inspect your Dialogue Manager GameObject. Expand Display Settings > Subtitle Settings. Set the Continue Button dropdown to Always.

2. Make sure your dialogue UI's subtitle panel(s) have continue buttons. The prefab dialogue UIs that ship with the Dialogue System all have continue buttons.

3. On the Dialogue Manager's Input Device Manager component, tick Always Auto Focus. During conversations, this will keep a UI button focused (selected) so the Unity UI EventSystem's "Submit" input will click it. When a subtitle is visible, it keeps the subtitle panel's continue button focused. By default, the "Submit" input is mapped to Space and Enter.

For tips on other ways to handle continue buttons, please see this how-to article.
ytrevor
Posts: 5
Joined: Wed Jun 15, 2022 11:22 pm

Re: Scroll dialogue boxes by pressing 'Space' key

Post by ytrevor »

Thankyou so much! That worked :)
User avatar
Tony Li
Posts: 22148
Joined: Thu Jul 18, 2013 1:27 pm

Re: Scroll dialogue boxes by pressing 'Space' key

Post by Tony Li »

Glad to help!
Post Reply