Hi there,
How do I set it so that certain objects and quests are only available once certain requirements are met?
For example, I have a scene where my player is asked to collect 3 different items. They can obtain them in any order they choose. However, I can't seem to set a new quest to activate once the previous 3 quests have been completed. I thought using the Lua Conditions and Quest Conditions would do this, however, nothing seems to change or update in my Quest UI.
How do I set my quest to activate upon the completion of other quests?
How do I activate quests on a condition?
-
- Posts: 65
- Joined: Fri Feb 06, 2015 3:51 pm
Re: How do I activate quests on a condition?
Hi,
Could it be that the quest state data is being set properly but the UI isn't updating?
You can check the data by opening the Dialogue Editor at runtime and switching to the Watch tab. Then add the quest state as a watch -- for example:
Another way to check, which I prefer, is the Lua Console. If you add this component to your scene, the ~+L keys open the console. Then enter any Lua code, such as:
If the quest states are being set correctly, then it's just an issue with the quest tracker HUD. If this is the case, wait for version 1.5.3, which is being released tomorrow. Or, if you want to get it working in 1.5.2, manually send the message "UpdateTracker" to the Dialogue Manager GameObject. The upcoming version 1.5.3 does this automatically behind the scenes.
If the data isn't being set the way you want, then your trigger component probably isn't firing. If this is the case, please let me know how your triggers are set up. Screenshots might be easiest.
Could it be that the quest state data is being set properly but the UI isn't updating?
You can check the data by opening the Dialogue Editor at runtime and switching to the Watch tab. Then add the quest state as a watch -- for example:
Code: Select all
Quest["My_Quest"].State
Code: Select all
return Quest["My_Quest"].State
If the data isn't being set the way you want, then your trigger component probably isn't firing. If this is the case, please let me know how your triggers are set up. Screenshots might be easiest.
-
- Posts: 65
- Joined: Fri Feb 06, 2015 3:51 pm
Re: How do I activate quests on a condition?
I checked in the Watch tab, but it doesn't seem like my "Buy items" quest is activating. It's still showing up as unassigned. Here's a picture of my quest trigger.
- Attachments
-
- Screen Shot 2015-07-06 at 3.52.43 PM.png (74.7 KiB) Viewed 895 times
Re: How do I activate quests on a condition?
Hi,
Does the alert message "You have your groceries. Go to the cashier..." appear?
If so, the Quest Trigger is firing. Set the Dialogue Manager's Debug Level to Info and check the console for any clues. If you don't see any smoking guns, feel free to email the editor.log to tony (at) pixelcrushers.com.
If the alert message doesn't appear, something is preventing the Quest Trigger from firing at the right time. I think I might know what's going on.
First, as an aside, since you have the three Quest Conditions, you probably don't need the same thing in the Lua Conditions. If the Lua condition is checking the same three quest states, you can remove it.
Now on to what I think the issue is: Quest Trigger only checks the Condition once, when the Trigger setting (On Enable) is first true. It doesn't check it continuously.
If you want to check continuously, use Condition Observer. There's a quest-oriented tutorial on this page.
Otherwise, if you don't want to check continuously, make sure you set up the Quest Trigger so it fires every time the player does something that changes the state of the Get Fruit/Milk/Seasoning quests. For example, you could set the Trigger to OnUse and use the SendMessage() sequencer command to send "OnUse" to the Quest Trigger. Or, if you know the quests only change state during conversations, you could use a Set Quest State On Dialogue Event component.
Does the alert message "You have your groceries. Go to the cashier..." appear?
If so, the Quest Trigger is firing. Set the Dialogue Manager's Debug Level to Info and check the console for any clues. If you don't see any smoking guns, feel free to email the editor.log to tony (at) pixelcrushers.com.
If the alert message doesn't appear, something is preventing the Quest Trigger from firing at the right time. I think I might know what's going on.
First, as an aside, since you have the three Quest Conditions, you probably don't need the same thing in the Lua Conditions. If the Lua condition is checking the same three quest states, you can remove it.
Now on to what I think the issue is: Quest Trigger only checks the Condition once, when the Trigger setting (On Enable) is first true. It doesn't check it continuously.
If you want to check continuously, use Condition Observer. There's a quest-oriented tutorial on this page.
Otherwise, if you don't want to check continuously, make sure you set up the Quest Trigger so it fires every time the player does something that changes the state of the Get Fruit/Milk/Seasoning quests. For example, you could set the Trigger to OnUse and use the SendMessage() sequencer command to send "OnUse" to the Quest Trigger. Or, if you know the quests only change state during conversations, you could use a Set Quest State On Dialogue Event component.