Hi! I want my player to have a quest start automatically when the game starts. The quest involves visiting a character, who will then kick off the narrative of the game.
I've created a quest and assigned it to the NPC character in question. I have 3 nodes: Start > Return to Quest Giver > Success. I've added the quest to the Quest Database.
I've tried setting the Quest "Current State" to "Active" as well as tried setting the "Start" node to "Active". Whatever I try, I haven't been able to see the quest appear in the player journal or on the HUD as an active quest.
Is there a better way to have a quest immediately become active when the player starts the game?
Many thanks!
Start game with active quest
Re: Start game with active quest
Getting somewhere with this! I'm now trying to use the QuestGiver.GiveQuestToQuester() method in a component Start().
I've got as far as this, but I'm stuck on how to retrieve the QuestListContainer for the player:
How do I set / retrieve the "id" of the appropriate QuestListContainer for the player?
I've got as far as this, but I'm stuck on how to retrieve the QuestListContainer for the player:
Code: Select all
Quest questInstance = QuestMachine.GetQuestInstance(questId);
QuestListContainer questList = QuestMachine.GetQuestListContainer(???)
questGiver.GiveQuestToQuester(questInstance, questList);
Re: Start game with active quest
Hi,
You can use QuestMachine.GetQuestJournal():
However, you may be looking for How To: Start Quest From Quest.
You can use QuestMachine.GetQuestJournal():
Code: Select all
questGiver.GiveQuestToQuester(questInstance, QuestMachine.GetQuestJournal());
Re: Start game with active quest
That's the one! Thanks again, Tony!
Re: Start game with active quest
Glad to help!