Quest Tracker
Posted: Mon Nov 25, 2019 3:12 pm
Hello, I'm just trying to finish up some last things for quests and I'm trying to make the tracker show only a specific entry. For instance 1/10 goblins killed... etc.
I've made a new QuestTracker class like this
But nothing shows up. Is there something else I need to adjust to make it show an entry only when active?
Thanks.
I've made a new QuestTracker class like this
Code: Select all
public class CustomQuestTracker : StandardUIQuestTracker
{
protected override string GetQuestEntryText(string quest, int entryNum, QuestState entryState)
{
if (entryState == QuestState.Unassigned || entryState == QuestState.Abandoned)
{
return string.Empty;
}
else if ((entryState == QuestState.Success || entryState == QuestState.Failure) && !showCompletedEntryText)
{
return string.Empty;
}
else if (entryState == QuestState.Success)
{
return string.Empty;
}
else if (entryState == QuestState.Failure)
{
return string.Empty;
}
else if (entryState == QuestState.Active)
{
var text = DialogueLua.GetQuestField(quest, QuestLog.GetQuestEntry(quest, 1)).asString;
if (!string.IsNullOrEmpty(text)) return text;
}
return QuestLog.GetQuestEntry(quest, entryNum);
}
}
Thanks.