Starting with an accepted quest

Announcements, support questions, and discussion for Quest Machine.
Post Reply
wendy3112
Posts: 11
Joined: Sat Jun 15, 2019 8:31 am

Starting with an accepted quest

Post 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.
wendy3112
Posts: 11
Joined: Sat Jun 15, 2019 8:31 am

Re: Starting with an accepted quest

Post 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.
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: Starting with an accepted quest

Post 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 1159 times

It waits 1 frame, which gives the journal time to set up. Then it tells Quest Machine to refresh its UIs.
thaptam
Posts: 13
Joined: Wed Aug 07, 2019 12:31 pm

Re: Starting with an accepted quest

Post 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.
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: Starting with an accepted quest

Post 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.
thaptam
Posts: 13
Joined: Wed Aug 07, 2019 12:31 pm

Re: Starting with an accepted quest

Post by thaptam »

Please ignore my previous post. I send a second message "Refresh UIs" after the first quest completed. And it works.
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: Starting with an accepted quest

Post by Tony Li »

Ok, no problem. Glad it works.
Post Reply