Use keyboard to navigate conversation

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
iloveloon
Posts: 10
Joined: Wed Dec 01, 2021 12:49 pm

Use keyboard to navigate conversation

Post by iloveloon »

Hi, I want to use keyboard button such as Up, down, spacebar to navigate the conversation without using mouse.

Currently the keyboard is detected when I press Spacebar but it does not continue nor select response menu.

The submit button is Enter and it doesn't work too.

I've already set "Always auto focus" on Input Device Manager.

More information I don't know if related is I've set continue button to cover the whole screen and can click anywhere to continue. This works perfectly.

Image
User avatar
Tony Li
Posts: 22154
Joined: Thu Jul 18, 2013 1:27 pm

Re: Use keyboard to navigate conversation

Post by Tony Li »

Hi,

The Input Device Manager's Always Auto Focus should tell the response menu panel to keep a response button focused so you can navigate them.

Inspect your response menu panel's StandardUIMenuPanel component, and set the Focus Check Frequency to 0.2 (or something non-zero). Try setting Refresh Selectables Frequency to 0.5.

Also check your EventSystem GameObject's Vertical Axis. Make sure it's set to an input that detects vertical axis input. If you're using Unity's built-in input manager, it defaults to "Vertical". In Edit > Project Settings > Input, make sure "Vertical" reads input from the keyboard.

During play, keep an inspector view on the EventSystem GameObject. It will show what UI button is focused (selected).
iloveloon
Posts: 10
Joined: Wed Dec 01, 2021 12:49 pm

Re: Use keyboard to navigate conversation

Post by iloveloon »

Hi, I add PauseTopdownDuringConversation to my dialogue manager and it's working now !!

But I don't want the game to be paused during the conversation so I unchecked "Pause during conversation" but it's still paused.
User avatar
Tony Li
Posts: 22154
Joined: Thu Jul 18, 2013 1:27 pm

Re: Use keyboard to navigate conversation

Post by Tony Li »

Hi,

Please try this updated TDE integration package, which will be in DS 2.2.24.

DS_TopDownEngineSupport_2022-01-06.unitypackage
iloveloon
Posts: 10
Joined: Wed Dec 01, 2021 12:49 pm

Re: Use keyboard to navigate conversation

Post by iloveloon »

Thank you ! it works ! but new problem occurred.

When I'm running and start conversation, the player won't stop running in that direction. I had fix this before by disable various component On ConversationStart and enable them OnConversationEnd but the new PauseTopDownDuringConversations make this running thing happen again.

Image
User avatar
Tony Li
Posts: 22154
Joined: Thu Jul 18, 2013 1:27 pm

Re: Use keyboard to navigate conversation

Post by Tony Li »

Hi,

Does your player character have a CharacterPause component? If so, PauseTopDownDuringConversations will use it to pause the player character during conversations.

Otherwise, please confirm that the player character's GameObject is being used as the conversation's actor. Temporarily set the Dialogue Manager's Other Settings > Debug Level to Info. When a conversation starts, the Console will log something like:

Dialogue System: Starting conversation 'title' with actor=XXX and conversant=YYY

Make sure XXX is the scene instance of the player GameObject.
iloveloon
Posts: 10
Joined: Wed Dec 01, 2021 12:49 pm

Re: Use keyboard to navigate conversation

Post by iloveloon »

Yes, My player has a CharacterPause component so I disable the component OnConversationStart and enable it OnConversationEnd and it works now !! thank you so much !!
User avatar
Tony Li
Posts: 22154
Joined: Thu Jul 18, 2013 1:27 pm

Re: Use keyboard to navigate conversation

Post by Tony Li »

Great!

I've also added some other improvements to the upcoming TDE integration's PauseTopDownDuringConversations that will be in DS 2.2.24.
Post Reply