Can Condition statement GiveQuestToQuester also send StartDialogueWithPlayer
- CamperJohn
- Posts: 14
- Joined: Sun Apr 05, 2020 7:01 pm
- Contact:
Can Condition statement GiveQuestToQuester also send StartDialogueWithPlayer
Started using the GiveQuestToQuester within a Condition statement of a quest when True. Got it working fine and it sends a message to the HUD that it has been given. However, is there a way to send StartDialogueWithPlayer at the same time so the player can automatically see/read the quest (in case the player does not see it pop-up in the HUD)?
Re: Can Condition statement GiveQuestToQuester also send StartDialogueWithPlayer
Hi,
Yes. Inspect the quest's main properties > States > Active > Actions. Add a Start Conversation action, and select the conversation that you want to start. Make sure the conversation has at least one node whose conditions will be true; otherwise the Dialogue System will try to start the conversation but find that no nodes are eligible to be shown.
Yes. Inspect the quest's main properties > States > Active > Actions. Add a Start Conversation action, and select the conversation that you want to start. Make sure the conversation has at least one node whose conditions will be true; otherwise the Dialogue System will try to start the conversation but find that no nodes are eligible to be shown.
- CamperJohn
- Posts: 14
- Joined: Sun Apr 05, 2020 7:01 pm
- Contact:
Re: Can Condition statement GiveQuestToQuester also send StartDialogueWithPlayer
From what I can see, there is no Start Conversation available from States > Active > Actions....does this need to be added somewhere as a valid choice?
- Attachments
-
- Image4.png (130.61 KiB) Viewed 1154 times
Re: Can Condition statement GiveQuestToQuester also send StartDialogueWithPlayer
Hi,
Sorry, I thought you were using Quest Machine's Dialogue System integration, so I described how to start a Dialogue System conversation.
To call StartDialogueWithPlayer:
1. Open the scene with the QuestGiver NPC.
2. Add a Scene Event action (not a Dialogue System Start Conversation action) to the quest.
3. Configure the Scene Event action to call the NPC's QuestGiver.StartDialogueWithPlayer method.
Sorry, I thought you were using Quest Machine's Dialogue System integration, so I described how to start a Dialogue System conversation.
To call StartDialogueWithPlayer:
1. Open the scene with the QuestGiver NPC.
2. Add a Scene Event action (not a Dialogue System Start Conversation action) to the quest.
3. Configure the Scene Event action to call the NPC's QuestGiver.StartDialogueWithPlayer method.
- CamperJohn
- Posts: 14
- Joined: Sun Apr 05, 2020 7:01 pm
- Contact:
Re: Can Condition statement GiveQuestToQuester also send StartDialogueWithPlayer
Thanks.
I think I got it working with the Scene Event and the following code:
public void Givequest()
{
GetComponent<QuestGiver>().StartDialogueWithPlayer();
}
Not sure if this is the best way, but first test went through without errors.
I think I got it working with the Scene Event and the following code:
public void Givequest()
{
GetComponent<QuestGiver>().StartDialogueWithPlayer();
}
Not sure if this is the best way, but first test went through without errors.
Re: Can Condition statement GiveQuestToQuester also send StartDialogueWithPlayer
Hi John,
That's fine. But you don't really need the custom script. You can assign the QuestGiver component directly to the scene event, and set it to QuestGiver.StartDialogueWithPlayer.
That's fine. But you don't really need the custom script. You can assign the QuestGiver component directly to the scene event, and set it to QuestGiver.StartDialogueWithPlayer.
- CamperJohn
- Posts: 14
- Joined: Sun Apr 05, 2020 7:01 pm
- Contact:
Re: Can Condition statement GiveQuestToQuester also send StartDialogueWithPlayer
Typical John move, making something harder than it really is. Thanks Tony, I got caught up writing scripts and failed to look at the simpler and easier way to perform the task. As always, thanks for such a quick reply...best support I have ever experienced.
Re: Can Condition statement GiveQuestToQuester also send StartDialogueWithPlayer
Always happy to help!