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
Open Quests
Re: Open Quests
I worked out the removal of hot key - just not sure how to open the quest with and on click
Re: Open Quests
Hi,
Call the quest log window's Open() method. Example:
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+.)
Call the quest log window's Open() method. Example:
Code: Select all
PixelCrushers.GameObjectUtility.FindFirstObjectByType<QuestLogWindow>().Open();
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+.)
Re: Open Quests
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
Cheers
Re: Open Quests
Hi,
Try this:
It uses the variant of QuestLog.GetAllQuests() that returns a list of all active quests.
Try this:
Code: Select all
int numActiveQuests = QuestLog.GetAllQuests().Length;