Page 1 of 2

Quest Alert not working

Posted: Thu Jul 16, 2015 3:30 pm
by SuperSparkplug
Hi,

I have a quest trigger on an object that activates on comversation end. While I'm able to get the quest to trigger, the Alert message explaining it does not appear. Why might that be?

Re: Quest Alert not working

Posted: Thu Jul 16, 2015 5:51 pm
by Tony Li
Hi,

Is the alert panel not visible in your UI?

I tested the JRPG2 in the Quest Example scene, and the Quest Trigger shows alerts. Here's what I did:

1. Opened Dialogue System/Examples/Quest Example/Quest Example.

2. Inspected the Dialogue Manager GameObject, assigned the JRPG2 Dialogue UI prefab to the Dialogue UI field, and set Debug Level to Info.

3. Played the scene. Took Lieutenant West's quest (find the terminal), and then walked into the open doorway to trigger the Quest Trigger. The JRPG2 UI showed "Found the Terminal". The Console view contains the text "Dialogue System: Setting quest 'Find the Terminal' state to 'success'".

I temporarily set Debug Level to Info to get confirmation that the Quest Trigger was actually firing.

Then I moved the Quest Trigger to Lt. West, changed the trigger type to OnConversationEnd, and edited his conversation so the last line's Script field doesn't try to show its own alert message. Then, when I ended the conversation, the Quest Trigger immediately fired and showed the "Found the Terminal" alert message.


If this doesn't work in your scene, then try these steps:

1. After the Quest Trigger, pause the game and check the scene object Dialogue Manager/JRPG2 Dialogue UI(Clone)/GUI Root/Alert Panel/Alert:

- Does its GUILabel component contain your alert message text?
- Is the object active?
- Have you changed the position or size of its scaled rect, or changed the GUI style so it's not visible?

2. If that doesn't help, please post a screenshot of your Quest Trigger, or feel free to send me an example scene that demonstrates the issue.

Re: Quest Alert not working

Posted: Tue Jul 21, 2015 4:47 am
by SuperSparkplug
Here is the Quest Trigger in question

Re: Quest Alert not working

Posted: Tue Jul 21, 2015 4:57 am
by SuperSparkplug
In addition, in another scene, I can't get this quest to fire at all. I'm also getting very strange errors. Here's some images.

http://imgur.com/a/kXqM9

Re: Quest Alert not working

Posted: Tue Jul 21, 2015 9:33 am
by Tony Li
Let's take one scene at a time. In the first scene, the problem is that the alert message doesn't show, right?

1. Does the Quest Trigger correctly set the "Leave Work" quest's state to Active? Here are some ways you can check this:
  • In the Dialogue Editor window's Watch tab (available at runtime), add a watch for Quest["Leave_Work"].State
  • Add a Lua Console to your scene, and run this command: return Quest["Leave_Work"].State
  • Set up a quest log window and check the Active quests section
2. In the Hierarchy view, expand the JRPG2 Dialogue UI GameObject structure and inspect Alert Line. Does its Text field contain "It's the end of the day..."?

Re: Quest Alert not working

Posted: Tue Jul 21, 2015 6:40 pm
by SuperSparkplug
1. Already did that. The quest is assigned and it shows up on my Quest Tracker. It's just the alert that isn't firing.

2. No, it actually shows the alert from the last quest for some reason, which means the alert from the previous quest seems to be blocking it or something.

Re: Quest Alert not working

Posted: Tue Jul 21, 2015 9:34 pm
by Tony Li
SuperSparkplug wrote:2. No, it actually shows the alert from the last quest for some reason, which means the alert from the previous quest seems to be blocking it or something.
Is it possible that the previous quest trigger is also firing at the same time? If both quest triggers fire at the same time, you can't guarantee which alert message will take precedence.

Re: Quest Alert not working

Posted: Tue Jul 21, 2015 10:05 pm
by Tony Li
Also, to clear up the "Failed to call function..." errors in your triggers that are set to OnSequenceStart and OnSequenceEnd, assign a GameObject to the Sequence Trigger's GameObject field. Unless you use the special keyword 'speaker' in the sequence, the only other reason you need to assign a GameObject is for the OnSequenceStart and OnSequenceEnd trigger dropdowns to work. I've removed this restriction in the next version of the Dialogue System.

Re: Quest Alert not working

Posted: Tue Jul 21, 2015 10:36 pm
by SuperSparkplug
Tony Li wrote:
SuperSparkplug wrote:2. No, it actually shows the alert from the last quest for some reason, which means the alert from the previous quest seems to be blocking it or something.
Is it possible that the previous quest trigger is also firing at the same time? If both quest triggers fire at the same time, you can't guarantee which alert message will take precedence.
The Alert message in question was fired at the start of the quest, not upon completion of it. Before posting this topic, I did notice that I was completing one and assigning the other at the same time and changed it so that the first quest would be marked as completed upon OnTriggerEnter that started the cutscene. That didn't solve the problem either. The first quest is definitely being registered as a success though because it disappears from my Quest Tracker, which only shows active quests. The new quest also appears at the quest tracker when I assign it, but like I was saying the Alert seems to be ignored. Not sure why.

Re: Quest Alert not working

Posted: Tue Jul 21, 2015 10:57 pm
by Tony Li
Are any of these quests being updated during conversations, or at conversation start/end? By default, the Dialogue Manager doesn't allow alerts to appear during conversations (to prevent screen clutter). You can manually show a pending alert message by calling the sequencer command ShowAlerts() at any point during the conversation.

As an experiment, you could also inspect the Dialogue Manager's Alert Settings. Tick Allow Alerts During Conversations, and set Alert Check Frequency to 1 (i.e., every second). Then play the scene again. This might give you a more accurate idea of when alerts messages are being set.

If that doesn't help, would you please describe your intended order of events? For example, something like this:

1. Quest Trigger 1 (set to OnTriggerEnter) sets the Put On Pants quest to Active and shows the alert "Put on some pants."

2. Quest Trigger 2 (set to OnTriggerEnter) sets the Put On Pants quest to Success, and sends the message "OnUse" to Quest Trigger 3.

3. Quest Trigger 3 (set to OnUse) sets the Put On Shirt quest to Active and shows the alert "Put on a shirt."

If you can also provide screenshots for the triggers, that would be even better.