Previously, I started a quest by sending a message and listening to it in Autostart. It worked, but I didn't wanna have to do this for each quest, so I wanted to instead start it directly from the quest, so I changed to:
Code: Select all
questToStart.SetState(QuestState.Active);
I don't know why this should work once and not more. Is there some event listener that weren't unsubscribed?
Thank you in advance!
Code: Select all
Message System exception sending 'Quest State Changed'/'Makeburger' to Quest Machine (BlueGoo.Quests.DisplayQuestStatusChange): Object reference not set to an instance of an object
UnityEngine.Debug:LogError(Object)
PixelCrushers.MessageSystem:SendMessageWithTarget(Object, Object, String, String, Object[]) (at Assets/Plugins/Pixel Crushers/Common/Scripts/Message System/MessageSystem.cs:328)
PixelCrushers.MessageSystem:SendMessage(Object, String, StringField, Object[]) (at Assets/Plugins/Pixel Crushers/Common/Scripts/Message System/MessageSystem.cs:424)
PixelCrushers.QuestMachine.QuestMachineMessages:QuestStateChanged(Object, StringField, QuestState) (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Utility/QuestMachineMessages.cs:153)
PixelCrushers.QuestMachine.Quest:SetState(QuestState, Boolean) (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest/Quest.cs:829)
PixelCrushers.QuestMachine.Quest:RuntimeStartup() (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest/Quest.cs:720)
PixelCrushers.QuestMachine.QuestListContainer:AddQuest(Quest) (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest MonoBehaviours/Quest List/QuestListContainer.cs:183)
PixelCrushers.QuestMachine.QuestJournal:AddQuest(Quest) (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest MonoBehaviours/Quest List/QuestJournal.cs:167)
PixelCrushers.QuestMachine.QuestListContainer:AddQuests(List`1) (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest MonoBehaviours/Quest List/QuestListContainer.cs:170)
PixelCrushers.QuestMachine.QuestListContainer:InstantiateQuestAssets() (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest MonoBehaviours/Quest List/QuestListContainer.cs:140)
PixelCrushers.QuestMachine.QuestListContainer:Awake() (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest MonoBehaviours/Quest List/QuestListContainer.cs:124)