[HOWTO] How To: Set Up Quest Indicators

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
User avatar
Tony Li
Posts: 20690
Joined: Thu Jul 18, 2013 1:27 pm

[HOWTO] How To: Set Up Quest Indicators

Post by Tony Li »

This article explains how to set up overhead quest indicators for NPCs. To see an example in action, examine the NPC named Sergeant Graves in DemoScene2.


1. Add some overhead bubbles (SpriteRenderers, UI images, whatever you like) as children of the NPC and set them inactive. Add a Quest State Indicator component to the NPC and assign the overhead bubbles. Make a note of their element number's -- for example, in the screenshot below Question Mark is Element 1.

questStateIndicators.png
questStateIndicators.png (76.87 KiB) Viewed 729 times

Also note that the order of the indicators is important. Higher element numbers will take precedence over lower. So if the NPC has two quests and wants to show Question Mark for one quest but Exclamation Mark for another quest, it will show Exclamation Mark because its element number is higher.


2. Add a Quest State Listener component to the NPC. Set the Quest Name dropdown to a quest.

Then add elements to Quest State Indicator Levels. Each element specifies a quest state, optional conditions, and a quest indicator element number. When the quest is in the specified state and any optional conditions are true, the Quest State Listener will tell the Quest State Indicator to show the corresponding indicator. In the screenshot below, when the "Enemy Attack" quest's state is Grantable, it will show indicator number 1 (Question Mark):

questStateIndicators.png
questStateIndicators.png (76.87 KiB) Viewed 729 times

There is also a similar section for specific quest entries (sub-tasks in quests) which you can set up in the same way.
Attachments
questStateListener.png
questStateListener.png (87.73 KiB) Viewed 729 times
DrewThomasArt
Posts: 60
Joined: Thu Mar 24, 2022 12:07 am

Re: [HOWTO] How To: Set Up Quest Indicators

Post by DrewThomasArt »

This is amazing, thank you so much.
DrewThomasArt
Posts: 60
Joined: Thu Mar 24, 2022 12:07 am

Re: [HOWTO] How To: Set Up Quest Indicators

Post by DrewThomasArt »

Tony Li wrote: Wed Oct 19, 2022 9:55 am
1. Add some overhead bubbles (SpriteRenderers, UI images, whatever you like) as children of the NPC and set them inactive. Add a Quest State Indicator component to the NPC and assign the overhead bubbles. Make a note of their element number's -- for example, in the screenshot below Question Mark is Element 1.
Is there a way to set a quest indicator when the player has killed a certain amount of enemies?

I'm currently using the "Increment on Destroy" component and setting the quest state to "success" in a conversation on the condition that the player has killed enough monsters.
But it would be nice if the "completed quest" indicator could be there before the conversation started.
Thank you.
User avatar
Tony Li
Posts: 20690
Joined: Thu Jul 18, 2013 1:27 pm

Re: [HOWTO] How To: Set Up Quest Indicators

Post by Tony Li »

Post Reply