Quests not showing

Announcements, support questions, and discussion for Quest Machine.
Post Reply
TheTeaStoners
Posts: 1
Joined: Sat Oct 02, 2021 10:08 am

Quests not showing

Post by TheTeaStoners »

dear,
following up on my question on your youtube video
i have here the screenshots for the Quest Giver component
<<<
Schermafbeelding 2021-10-02 om 16.04.07.png
Schermafbeelding 2021-10-02 om 16.04.07.png (152.06 KiB) Viewed 471 times
Schermafbeelding 2021-10-02 om 16.04.26.png
Schermafbeelding 2021-10-02 om 16.04.26.png (112.93 KiB) Viewed 471 times
here is the screenshot for the player component
Schermafbeelding 2021-10-02 om 16.04.55.png
Schermafbeelding 2021-10-02 om 16.04.55.png (124.18 KiB) Viewed 471 times
and here is the configuration for the Journal Button
Schermafbeelding 2021-10-02 om 16.01.10.png
Schermafbeelding 2021-10-02 om 16.01.10.png (19.22 KiB) Viewed 471 times
here is my game view how i organized it
Schermafbeelding 2021-10-02 om 16.18.21.png
Schermafbeelding 2021-10-02 om 16.18.21.png (105.75 KiB) Viewed 471 times
thanks in advance
User avatar
Tony Li
Posts: 21926
Joined: Thu Jul 18, 2013 1:27 pm

Re: Quests not showing

Post by Tony Li »

Hi,

Thank you for posting the screenshots.

Do you want the Quest Giver NPC's quest dialogue to appear when the player clicks on the Quest Giver NPC?

If so, then you will want to configure the Quest Giver NPC to invoke QuestGiver.StartDialogueWithPlayer() when the players clicks on it.

One way to do this is to add a world space canvas to the NPC. Add a UI Button to the canvas. Configure the Button's OnClick() event to invoke QuestGiver.StartDialogueWithPlayer().

Another way is to add a script that has an OnMouseDown() method. (Note: This method works with Unity's built-in input manager, but it does not work with the new Input System package in case you've switched to the new Input System.)

Here's an example script:

MouseDownEvent.cs

Code: Select all

using UnityEngine;
using UnityEngine.Events;
public class MouseDownEvent : MonoBehaviour
{
    public UnityEvent onMouseDown;

    private void OnMouseDown()
    {
        onMouseDown.Invoke();
    }
}
If you add this script and a collider to the Quest Giver NPC, the script will have an OnMouseDown() UnityEvent. You can configure the UnityEvent to call QuestGiver.StartDialogueWithPlayer().
Post Reply