Open Quests

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
jrose1184
Posts: 62
Joined: Mon Jan 22, 2024 2:35 pm

Open Quests

Post by jrose1184 »

Hi,

Cou.d you pleae tell me how i can remove the J hotkey to open quests please.

Also could you tell me how i can open quest - im creating my own button to open it.

Many thanks
jrose1184
Posts: 62
Joined: Mon Jan 22, 2024 2:35 pm

Re: Open Quests

Post by jrose1184 »

I worked out the removal of hot key - just not sure how to open the quest with and on click
User avatar
Tony Li
Posts: 22886
Joined: Thu Jul 18, 2013 1:27 pm

Re: Open Quests

Post by Tony Li »

Hi,

Call the quest log window's Open() method. Example:

Code: Select all

PixelCrushers.GameObjectUtility.FindFirstObjectByType<QuestLogWindow>().Open();
Or, if you're using DS 2.2.50.1 or older, import this patch:

DS_QuestLogWindowHotkeyPatch_2024-12-04.unitypackage

It adds a ToggleQuestLogWindow() method to the QuestWindowHotkey component. You can add the component to your UI Button, set the key to None, and configure OnClick() to call QuestWindowHotkey.ToggleQuestLogWindow().

(DS 2.2.51 is coming soon. This update to QuestWindowHotkey is in 2.2.51+.)
jrose1184
Posts: 62
Joined: Mon Jan 22, 2024 2:35 pm

Re: Open Quests

Post by jrose1184 »

Awesome thanks Tony
jrose1184
Posts: 62
Joined: Mon Jan 22, 2024 2:35 pm

Re: Open Quests

Post by jrose1184 »

Sorry i do have a follow up question - Is there away i can count active quests. I was going to add a number next to my button to indicate how many quests are active

Cheers
User avatar
Tony Li
Posts: 22886
Joined: Thu Jul 18, 2013 1:27 pm

Re: Open Quests

Post by Tony Li »

Hi,

Try this:

Code: Select all

int numActiveQuests = QuestLog.GetAllQuests().Length;
It uses the variant of QuestLog.GetAllQuests() that returns a list of all active quests.
Post Reply