Showing the journal

Announcements, support questions, and discussion for Quest Machine.
Post Reply
Ollymuk
Posts: 39
Joined: Wed Oct 14, 2020 12:59 pm

Showing the journal

Post by Ollymuk »

Hi

This is a really dumb question but where do you set the key to open the journal?

The manual says that the demo is configured to use "joystick back", but it doesn't appear to go on to say where I can change that.

I'd like to map it to a key on the keyboard, and I've gone through the JournalUI settings, and had a rummage in the unity input profile, but I can't see an obvious entry there for it.

Olly
User avatar
Tony Li
Posts: 21925
Joined: Thu Jul 18, 2013 1:27 pm

Re: Showing the journal

Post by Tony Li »

Hi Olly,

The Demo's Gameplay Canvas > Journal Button has three components:
  • Quest Journal Button: Provides methods to show, hide, and toggle the quest journal.
  • (Unity UI) Button: Calls the Quest Journal Button component's ToggleJournalUI method.
  • UI Button Key Trigger: Maps a hotkey to the Button. On this button, it maps the "J" key and the joystick back button.
You can set up your own scene(s) similarly, or you can simply QuestJournal.ToggleJournalUI() in script. Example:

Code: Select all

if (Input.GetButtonDown("Toggle Journal")) // Assumes you've defined an input button with this name.
{
    QuestMachine.GetQuestJournal().ToggleJournalUI();
}
Ollymuk
Posts: 39
Joined: Wed Oct 14, 2020 12:59 pm

Re: Showing the journal

Post by Ollymuk »

Thanks.

So many new canvas layers and prefabs to get used to. Also learning DS at the same time.

I don't use UI buttons for the inventory here, all key press or controller button press so will use code in my controller script.

Thanks

Olly
User avatar
Tony Li
Posts: 21925
Joined: Thu Jul 18, 2013 1:27 pm

Re: Showing the journal

Post by Tony Li »

Glad to help! If any DS + QM integration questions come up, just ask.
Post Reply