Open the Journal using Keyboard Buttons

Announcements, support questions, and discussion for Quest Machine.
Post Reply
Mchia_Soo
Posts: 72
Joined: Sun Jun 30, 2019 11:59 pm

Open the Journal using Keyboard Buttons

Post by Mchia_Soo »

Hello Tony!

I want to open the Journal using the keyboard button, J. Any way to do it?

Thanks for your time and appreciate your help.
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: Open the Journal using Keyboard Buttons

Post by Tony Li »

Hi,

Call the QuestJournal's ToggleJournalUI() method to toggle it open or closed. Or call ShowJournalUI() to only open it.

You can do this in a script:

Code: Select all

QuestMachine.GetQuestJournal().ToggleJournalUI();
Or you can configure a UI button to open the journal, and then add a UIButtonKeyTrigger component to the UI button to map a hotkey to it.
Mchia_Soo
Posts: 72
Joined: Sun Jun 30, 2019 11:59 pm

Re: Open the Journal using Keyboard Buttons

Post by Mchia_Soo »

Nice! It's working perfectly!

But now I have some problems which link to Dialogue System - after I added this UIButtonKeyTrigger to my UI Button, Space button doesn't work for the continue button. Is there anything that I might possibly press wrong?

Also, the cursor is invisible when the game starts. Yet, I have unchecked 'Enable the cursor with escape' and have ticked on 'Show Cursor During Conversation'. 'Pause Game During Conversation' also doesn't work when the intro conversation(The OnStart conversation I set) displays.

I have been solving these issues for 1day+. Really appreciate your help!!
Mchia_Soo
Posts: 72
Joined: Sun Jun 30, 2019 11:59 pm

Re: Open the Journal using Keyboard Buttons

Post by Mchia_Soo »

These issues only happen in my level 2 and 3, in my level 1 game, everything is fine. I have even compared the assets in both levels, but nothing much difference.
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: Open the Journal using Keyboard Buttons

Post by Tony Li »

Hi,

On the Dialogue Manager (or wherever the Input Device Manager component is), set the Input Device Manager's Input Mode to Mouse. It defaults to Joystick.

Then tick Always Auto Focus.

These 2 changes may fix the issues you described.
Post Reply