Auto Show Alert
Auto Show Alert
Hello Tony,
I am considering adding a piece of code that would automatically display alerts when a quest is completed, and I have 2 questions:
1. Where to start?
2. I realized that many quests I have set up already have in their triggers Show Alert section used - is it somehow possible to avoid show alert duplication, or would I have to manually delete all those sections from all the triggers?
Thank you in advance,
Best!
I am considering adding a piece of code that would automatically display alerts when a quest is completed, and I have 2 questions:
1. Where to start?
2. I realized that many quests I have set up already have in their triggers Show Alert section used - is it somehow possible to avoid show alert duplication, or would I have to manually delete all those sections from all the triggers?
Thank you in advance,
Best!
Re: Auto Show Alert
I guess I would have to implement a simple queue for that anyway, just in case my character finishes more than 1 quest at a time - is there some method that would enable me to yield Show Alert execution until the currently displayed alert is showing?
Best!
Best!
Re: Auto Show Alert
Hi Artur,
If you're using Unity UI, inspect your dialogue UI and tick Alert > Queue Alerts. This will show alerts in sequence.
You can add a script to the Dialogue Manager (or a child GameObject) that has an OnQuestStateChange(questName) method. Maybe something like this:
I'm afraid you'll have to remove the same alert messages from your existing triggers.
If you're using Unity UI, inspect your dialogue UI and tick Alert > Queue Alerts. This will show alerts in sequence.
You can add a script to the Dialogue Manager (or a child GameObject) that has an OnQuestStateChange(questName) method. Maybe something like this:
Code: Select all
void OnQuestStateChange(string questName) {
if (QuestLog.IsQuestSuccessful(questName)) {
DialogueManager.ShowAlert("Quest Completed: " + QuestLog.GetQuestTitle(questName));
}
}
Re: Auto Show Alert
Tony,
thank you very much! Much appreciate the alert queue!
Best!
thank you very much! Much appreciate the alert queue!
Best!
Re: Auto Show Alert
Are there callbacks for quest entry state changes? I want to implement the similar on the quest entry level.
Best!
Best!
Re: Auto Show Alert
Do those messages work only if I use SetQuestState() method in my dialogues? I have lots of assignments like Quest["Acquaint_Voxel_Vlad"].State = "active".
BTW, how to convert checks like Quest["Acquaint_Voxel_Vlad"].State ~= "success" ?
Best!
BTW, how to convert checks like Quest["Acquaint_Voxel_Vlad"].State ~= "success" ?
Best!
Re: Auto Show Alert
Hi Artur,
It's the same callback. The Dialogue System sends "OnQuestStateChange" if a quest state changes or a quest entry state changes.mandi wrote:Are there callbacks for quest entry state changes? I want to implement the similar on the quest entry level.
I'm afraid those messages require SetQuestState(). This is one of the reasons I added SetQuestState(). I realized that it would be handy to do extra things when setting a quest state, such as automatically updating the quest tracker HUD and sending the message. Recent versions of the Dialogue System have a search bar in nodes or outline mode. You could use it to search for "Quest[" in each conversation and manually change it to SetQuestState() or CurrentQuestState(). Or you could export the database to CSV and do the searching in a text editor or Excel. Sorry about the manual work. If you have a lot of these, let me know. I might be able to put together an editor utility to automatically convert them.mandi wrote:Do those messages work only if I use SetQuestState() method in my dialogues? I have lots of assignments like Quest["Acquaint_Voxel_Vlad"].State = "active".
You could manually change them to:mandi wrote:BTW, how to convert checks like Quest["Acquaint_Voxel_Vlad"].State ~= "success" ?
Code: Select all
CurrentQuestState("Acquaint Voxel Vlad") ~= "success"
Re: Auto Show Alert
Hi Tony,
yes, I've got lots of these, actually all my levels so far are set up using this obsolete way. If you could make a simplest kind of a replacer tool, I would be very grateful. The good thing here is I now know why sometimes my on quest completed animations were not triggered
Best!
yes, I've got lots of these, actually all my levels so far are set up using this obsolete way. If you could make a simplest kind of a replacer tool, I would be very grateful. The good thing here is I now know why sometimes my on quest completed animations were not triggered
Best!
Re: Auto Show Alert
Will do! It might take a day or two. I'll post it here when it's ready.