The reason for this is because some items will be reused for multiple quests but only become available once the quest is first set active. This is the code I was trying out, but it only ever returns Unassigned and doesn't log false when switching state to active:
Code: Select all
public bool Check()
{
var actorName = actor.GetName();
string questName = DialogueLua.GetActorField(actorName, "Quest").asString;
var state = QuestLog.GetQuestState(questName);
QuestLog.UpdateQuestIndicators(questName);
if (!log) return default;
Debug.Log("Actor: " + actorName + ", State: " + state);
Debug.Log(state == QuestState.Unassigned);
return default;
}