Page 1 of 1

Best way to clear Quests

Posted: Fri May 24, 2019 6:04 pm
by Dougomite
Hi I was wondering what would be the best way to clear all current and/or past quests. For now, I'd like to be able to do this for quickly testing my game by jumping around the game with console commands and I'd like to clear my Quests when doing this. I may want this functionality in my final game in case I'd like a quest to expire or be removed from the game.

I've tried using QuestMachine.UnregisterAllQuestInstances & QuestMachine.GetQuestJournal.Reset, but it doesn't seem to be getting rid of the quests.

Re: Best way to clear Quests

Posted: Fri May 24, 2019 8:01 pm
by Tony Li
Hi,

If you want to clear the player's quest journal, find the QuestJournal component and call its DestroyQuestInstances() method. You can call QuestMachine.GetQuestJournal() to get the player's quest journal. For example:

Code: Select all

QuestMachine.GetQuestJournal().DestroyQuestInstances();
To delete a single quest, use DeleteQuest().

Re: Best way to clear Quests

Posted: Sat May 25, 2019 6:25 pm
by Dougomite
Excellent that's just what I needed. Thanks for the help.

Re: Best way to clear Quests

Posted: Sat May 25, 2019 7:05 pm
by Tony Li
Glad to help.