Page 1 of 1

Integrating journal into Invector inventory UI

Posted: Tue Aug 09, 2022 5:56 pm
by nickg84
Hello,

I'm trying to integrate the Quest journal into Invector's already established inventory menu. I'm getting close -- I've got a new Journal tab set up, which opens a blank screen and the Quest Journal UI as a child. I set the Start State on the UI as Open, so it automatically appears when I enter the Journal tab. So far, so good.

However, when accepting a new quest, the quest does not appear on the journal until I hit J to turn off the whole Quest Journal UI, then again to turn it back on. Ideally, I'd actually like to use J to open the Invector menu directly to the Journal tab, as opposed to turning the actual Quest journal on/off.

Thoughts? I'm new to Quest so still figuring things out.

Re: Integrating journal into Invector inventory UI

Posted: Tue Aug 09, 2022 6:21 pm
by Tony Li
Hi,

Please see: How To: Put Journal UI In Your Own Menu

It should update automatically when you accept a quest. If not, let me know and I'll post a short script that listens for the "quest state changed" message to tell it to update.

Re: Integrating journal into Invector inventory UI

Posted: Tue Aug 09, 2022 6:36 pm
by nickg84
Hi Tony,

Thank you for your response. I followed that little tutorial and am still running into issues for some reason. It's almost there, but accepted quests don't automatically appear, I have to hit J twice to make them appear. Also, as a side note, hitting J twice also replaces the pink haired avatar girl with an "Invector Shooter" logo.

Re: Integrating journal into Invector inventory UI

Posted: Tue Aug 09, 2022 6:47 pm
by Tony Li
In that case, the short script to listen for quest change messages wouldn't help. The quest journal hasn't been told it's open, so it thinks it's closed. When you open the Invector menu, call the quest journal's ShowJournalUI() method. One way to do this is to add a script like this to the journal UI:

Code: Select all

using UnityEngine;
using PixelCrushers.QuestMachine;

public class ShowJournalUIOnEnable : MonoBehavior
{
    private void OnEnable()
    {
        QuestMachine.GetQuestJournal().ShowJournalUI();
    }
}

Re: Integrating journal into Invector inventory UI

Posted: Tue Aug 09, 2022 7:10 pm
by nickg84
Worked like a charm, THANK YOU!

Re: Integrating journal into Invector inventory UI

Posted: Tue Aug 09, 2022 9:48 pm
by Tony Li
Happy to help!