working quest do not show dialog
-
- Posts: 11
- Joined: Fri Sep 07, 2018 10:24 pm
working quest do not show dialog
2、Then,My code is "MessageSystem.SendMessage(this, "FindGlass", "Start",null);"
3、result,the quest is active,but the dialog do not show in viewport,detail in attachment,quest.png
I want to auto start a quest and show the dialog,not use "QuestGiver.StartDialogue",because I don't let user select "Accept/decline".
Thanks.
Re: working quest do not show dialog
Hello,
If the quest is already active, you can use QuestGiver.StartDialogueWithPlayer(). It won't show the Accept/Decline dialogue because it doesn't need to offer the quest. Instead, it will show the Active > Dialogue Text.
Example:
If the quest is already active, you can use QuestGiver.StartDialogueWithPlayer(). It won't show the Accept/Decline dialogue because it doesn't need to offer the quest. Instead, it will show the Active > Dialogue Text.
Example:
Code: Select all
MessageSystem.SendMessage(this, "FindGlass", "Start");
GetComponent<QuestGiver>().StartDialogueWithPlayer();
-
- Posts: 11
- Joined: Fri Sep 07, 2018 10:24 pm
Re: working quest do not show dialog
OK,I have a try,thanks!
-
- Posts: 11
- Joined: Fri Sep 07, 2018 10:24 pm
Re: working quest do not show dialog
MessageSystem.SendMessage(this, "FindGlass", "Start");
questGiver.StartDialogueWithPlayer();
it don't show attachment mark(Heading Text/Body Text/Caption Text)?
Re: working quest do not show dialog
Sorry, I misunderstood. Now I understand that you want to show HUD text, not dialogue.
Is the quest on the player? It must be in the player's Quest Journal component.
If the quest is already in the player's Quest Journal but it is not active yet, you can do this:
If the quest is not in the player's Quest Journal but on a quest giver GameObject, you can call QuestGiver.GiveQuestToQuester to put it in the player's Quest Journal first:
Confirm that the player's Quest Journal has a copy of the quest, and this copy is active. If that is correct, then make sure the "findglass" node's Active > HUD Text contains content.
If you get stuck, you are welcome to send an example project to tony (at) pixelcrushers.com. I'll be happy to take a look.
Is the quest on the player? It must be in the player's Quest Journal component.
If the quest is already in the player's Quest Journal but it is not active yet, you can do this:
Code: Select all
MessageSystem.SendMessage(this, "FindGlass", "Start");
Code: Select all
QuestGiver giver = GetComponent<QuestGiver>(); // Need a reference to QuestGiver.
Quest quest = giver.FindQuest("Task1:FindGlass"); // Find quest in QuestGiver's list.
giver.GiveQuestToQuester(quest, "Player"); // Give quest to player's journal. Assumes player's ID is "Player".
MessageSystem.SendMessage(this, "FindGlass", "Start");
If you get stuck, you are welcome to send an example project to tony (at) pixelcrushers.com. I'll be happy to take a look.
-
- Posts: 11
- Joined: Fri Sep 07, 2018 10:24 pm
Re: working quest do not show dialog
It's OK,Thank you very much.