Page 1 of 1

Starting with an accepted quest

Posted: Mon Jun 17, 2019 1:43 am
by wendy3112
Hi, I have worked out how to start with a quest but how can it automatically get accepted so it will show in the hud and have an alert text show up. The quest shows in the journal as expected but the new quest alert and hud don't show up. The quest is just a simple quest that you have to find a missing villager.

Re: Starting with an accepted quest

Posted: Mon Jun 17, 2019 2:00 am
by wendy3112
I did notice that if I click that tick toggle it will go on and off with the hud but it never has the hud starting even though the tick is on.

Re: Starting with an accepted quest

Posted: Mon Jun 17, 2019 9:50 am
by Tony Li
Hi,

Normally you can just do these steps at design time:

1. In the Quest Editor, set the quest's state to Active.

2. Add the quest to the quest database.

3. Add the quest to the player's Quest Journal.

However, Invector's startup timing causes the journal to be set up after Quest Machine has sent the "Refresh UIs" message. Add a GameObject like the one below to refresh the UIs (e.g., quest HUD) when the Invector scene starts:

qmRefreshUIs.png
qmRefreshUIs.png (21.57 KiB) Viewed 1151 times

It waits 1 frame, which gives the journal time to set up. Then it tells Quest Machine to refresh its UIs.

Re: Starting with an accepted quest

Posted: Wed Aug 07, 2019 12:42 pm
by thaptam
Hi,

I have 2 quests with auto start. I followed the way you mentioned above, so the first quest shows the HUD but after the first quest finished, the second quest start but didn't show HUD, even I tried to send message "Refresh UIs". I'm not sure about the state of each quest. Does the finished quest still handle the UI? How can I show the HUD for the second quest?

Thank you for your help.

Re: Starting with an accepted quest

Posted: Wed Aug 07, 2019 12:50 pm
by Tony Li
Hi,

Are you sure the second quest is active?

Open the Quest Editor window. Inspect the player's Quest Journal component and click on the second quest. This will show the second quest in the Quest Editor window. The Inspector will show the quest's state in the Main Info section.

Re: Starting with an accepted quest

Posted: Wed Aug 07, 2019 1:06 pm
by thaptam
Please ignore my previous post. I send a second message "Refresh UIs" after the first quest completed. And it works.

Re: Starting with an accepted quest

Posted: Wed Aug 07, 2019 1:13 pm
by Tony Li
Ok, no problem. Glad it works.