The whole process works fine (almost).
1. I approach the Quest Giver.
2. I am presented with a quest.
3. I accept it (and the node is active)
4. I visit the area (and that node is active)
5. I return to the captain (and now all nodes are active)
All GUI elements updates as they should, when they should. The only issue is that the quest never appears in the Journal (even though I complete all parts and there is texts in all relevant places).
I also tried the tutorial database (with quest) and same result.
And as I said, I even tried with the tutorial prefabs. Same result.
I created a script that checks the journal when hitting U key.
1. I check after accepting the quest and get this:
Quest in journal: ExploreCircleAndReturn
Quest state: Active
2. I check after completing first step and get this:
Quest in journal: ExploreCircleAndReturn
Quest state: Active
3. I check after returning to the captain (last step) and get this:
No quests found in the journal.
Debug says:
Quest Machine: ExploreCircleAndReturn.SetState(Disabled, informListeners=True)
UnityEngine.Debug:Log (object,UnityEngine.Object)
PixelCrushers.QuestMachine.Quest:SetState (PixelCrushers.QuestMachine.QuestState,bool) (at Assets/ThirdParty/Pixel Crushers/Quest Machine/Scripts/Quest/Quest.cs:933)
PixelCrushers.QuestMachine.Quest:DestroyInstance (PixelCrushers.QuestMachine.Quest) (at Assets/ThirdParty/Pixel Crushers/Quest Machine/Scripts/Quest/Quest.cs:679)
PixelCrushers.QuestMachine.QuestListContainer:DeleteQuest (PixelCrushers.QuestMachine.Quest) (at Assets/ThirdParty/Pixel Crushers/Quest Machine/Scripts/Quest MonoBehaviours/Quest List/QuestListContainer.cs:327)
PixelCrushers.QuestMachine.QuestJournal:CheckQuestState (PixelCrushers.MessageArgs) (at Assets/ThirdParty/Pixel Crushers/Quest Machine/Scripts/Quest MonoBehaviours/Quest List/QuestJournal.cs:172)
PixelCrushers.QuestMachine.QuestJournal:OnMessage (PixelCrushers.MessageArgs) (at Assets/ThirdParty/Pixel Crushers/Quest Machine/Scripts/Quest MonoBehaviours/Quest List/QuestJournal.cs:139)
PixelCrushers.MessageSystem:SendMessageToListener (PixelCrushers.MessageSystem/ListenerInfo,object,object,string,string,PixelCrushers.MessageArgs) (at Assets/ThirdParty/Pixel Crushers/Common/Scripts/Message System/MessageSystem.cs:402)
PixelCrushers.MessageSystem:SendMessageWithTarget (object,object,string,string,object[]) (at Assets/ThirdParty/Pixel Crushers/Common/Scripts/Message System/MessageSystem.cs:377)
PixelCrushers.MessageSystem:SendMessage (object,string,PixelCrushers.StringField,object[]) (at Assets/ThirdParty/Pixel Crushers/Common/Scripts/Message System/MessageSystem.cs:489)
PixelCrushers.QuestMachine.QuestMachineMessages:QuestStateChanged (object,PixelCrushers.StringField,PixelCrushers.QuestMachine.QuestState) (at Assets/ThirdParty/Pixel Crushers/Quest Machine/Scripts/Utility/QuestMachineMessages.cs:160)
PixelCrushers.QuestMachine.Quest:SetState (PixelCrushers.QuestMachine.QuestState,bool) (at Assets/ThirdParty/Pixel Crushers/Quest Machine/Scripts/Quest/Quest.cs:948)
PixelCrushers.QuestMachine.QuestNode:SetState (PixelCrushers.QuestMachine.QuestNodeState,bool) (at Assets/ThirdParty/Pixel Crushers/Quest Machine/Scripts/Quest/Quest Node/QuestNode.cs:473)
PixelCrushers.QuestMachine.QuestNode:SetState (PixelCrushers.QuestMachine.QuestNodeState,bool) (at Assets/ThirdParty/Pixel Crushers/Quest Machine/Scripts/Quest/Quest Node/QuestNode.cs:465)
PixelCrushers.QuestMachine.QuestNode:OnParentStateChange (PixelCrushers.QuestMachine.QuestNode) (at Assets/ThirdParty/Pixel Crushers/Quest Machine/Scripts/Quest/Quest Node/QuestNode.cs:540)
PixelCrushers.QuestMachine.QuestNode:SetState (PixelCrushers.QuestMachine.QuestNodeState,bool) (at Assets/ThirdParty/Pixel Crushers/Quest Machine/Scripts/Quest/Quest Node/QuestNode.cs:450)
PixelCrushers.QuestMachine.QuestNode:OnConditionsTrue () (at Assets/ThirdParty/Pixel Crushers/Quest Machine/Scripts/Quest/Quest Node/QuestNode.cs:527)
PixelCrushers.QuestMachine.QuestConditionSet:SetTrue () (at Assets/ThirdParty/Pixel Crushers/Quest Machine/Scripts/Quest/Quest Condition Set/QuestConditionSet.cs:222)
PixelCrushers.QuestMachine.QuestConditionSet:OnTrueCondition () (at Assets/ThirdParty/Pixel Crushers/Quest Machine/Scripts/Quest/Quest Condition Set/QuestConditionSet.cs:217)
PixelCrushers.QuestMachine.QuestCondition:SetTrue () (at Assets/ThirdParty/Pixel Crushers/Quest Machine/Scripts/Quest/Quest Subasset/Quest Condition/QuestCondition.cs:75)
PixelCrushers.QuestMachine.MessageQuestCondition:PixelCrushers.IMessageHandler.OnMessage (PixelCrushers.MessageArgs) (at Assets/ThirdParty/Pixel Crushers/Quest Machine/Scripts/Quest/Quest Subasset/Quest Condition/MessageQuestCondition.cs:171)
PixelCrushers.MessageSystem:SendMessageToListener (PixelCrushers.MessageSystem/ListenerInfo,object,object,string,string,PixelCrushers.MessageArgs) (at Assets/ThirdParty/Pixel Crushers/Common/Scripts/Message System/MessageSystem.cs:402)
PixelCrushers.MessageSystem:SendMessageWithTarget (object,object,string,string,object[]) (at Assets/ThirdParty/Pixel Crushers/Common/Scripts/Message System/MessageSystem.cs:377)
PixelCrushers.MessageSystem:SendMessageWithTarget (object,object,string,PixelCrushers.StringField,object[]) (at Assets/ThirdParty/Pixel Crushers/Common/Scripts/Message System/MessageSystem.cs:441)
PixelCrushers.QuestMachine.QuestMachineMessages:DiscussedQuest (object,object,PixelCrushers.StringField,PixelCrushers.StringField) (at Assets/ThirdParty/Pixel Crushers/Quest Machine/Scripts/Utility/QuestMachineMessages.cs:235)
PixelCrushers.QuestMachine.QuestGiver:ShowActiveQuest (PixelCrushers.QuestMachine.Quest) (at Assets/ThirdParty/Pixel Crushers/Quest Machine/Scripts/Quest MonoBehaviours/Quest List/QuestGiver.cs:774)
PixelCrushers.QuestMachine.QuestGiver:StartMostRelevantDialogue () (at Assets/ThirdParty/Pixel Crushers/Quest Machine/Scripts/Quest MonoBehaviours/Quest List/QuestGiver.cs:684)
PixelCrushers.QuestMachine.QuestGiver:StartDialogue (UnityEngine.GameObject) (at Assets/ThirdParty/Pixel Crushers/Quest Machine/Scripts/Quest MonoBehaviours/Quest List/QuestGiver.cs:597)
PixelCrushers.QuestMachine.QuestGiver:StartDialogueWithPlayer () (at Assets/ThirdParty/Pixel Crushers/Quest Machine/Scripts/Quest MonoBehaviours/Quest List/QuestGiver.cs:567)
UnityEngine.Events.UnityEvent`1<UnityEngine.GameObject>:Invoke (UnityEngine.GameObject)
PixelCrushers.TriggerEvent:OnTriggerEnter (UnityEngine.Collider) (at Assets/ThirdParty/Pixel Crushers/Common/Scripts/UnityEvents/TriggerEvent.cs:36)
Quest Machine: ExploreCircleAndReturn.SetState(Disabled, informListeners=True)
UnityEngine.Debug:Log (object,UnityEngine.Object)
PixelCrushers.QuestMachine.Quest:SetState (PixelCrushers.QuestMachine.QuestState,bool) (at Assets/ThirdParty/Pixel Crushers/Quest Machine/Scripts/Quest/Quest.cs:933)
PixelCrushers.QuestMachine.Quest:OnDestroy () (at Assets/ThirdParty/Pixel Crushers/Quest Machine/Scripts/Quest/Quest.cs:665)
This is my script:
Code: Select all
using UnityEngine;
using PixelCrushers.QuestMachine;
using System.Collections.Generic;
public class QuestDebugger : MonoBehaviour
{
private QuestJournal questJournal;
void Start()
{
questJournal = GetComponent<QuestJournal>();
if (questJournal == null)
{
Debug.LogWarning("QuestJournal component not found on this GameObject.");
}
}
void Update()
{
if (Input.GetKeyDown(KeyCode.U))
{
CheckQuestsInJournal();
}
}
public void CheckQuestsInJournal()
{
if (questJournal == null)
{
Debug.LogWarning("QuestJournal component is missing.");
return;
}
List<PixelCrushers.QuestMachine.Quest> quests = questJournal.questList;
if (quests == null || quests.Count == 0)
{
Debug.Log("No quests found in the journal.");
return;
}
foreach (PixelCrushers.QuestMachine.Quest quest in quests)
{
Debug.Log("Quest in journal: " + quest.id);
Debug.Log("Quest state: " + quest.GetState().ToString());
}
}
}
At no point does the quest appear in the journal.
I am using More Mountains top down engine if that is important