Opsive FCC Integration Not Pulling Focus on Dialogue Start

Announcements, support questions, and discussion for Quest Machine.
Post Reply
Dtortoise
Posts: 4
Joined: Thu Nov 18, 2021 3:14 pm

Opsive FCC Integration Not Pulling Focus on Dialogue Start

Post by Dtortoise »

I am new to Unity and I am trying to set up the integration between Opsive Character Controller and Quest Machine (and Pun). I was able to create my own quest and set up the interact and GreetQuestGiver abilities on the character controller. My NPC has the QuestGiver, Interactable, and QuestGiverInteractableTarget components attached to it. When I start the interaction with the NPC I am unable to interact with the UI components. I have attached the relevant configurations below. Possibly irrelevant but the Quest Machine Integration does not show up in the Character Manager Tab although I have confirmed that the integration content exists.

I originally posted this on the Opsive forum and I was redirected here. Any help is appreciated

Behavior
https://gyazo.com/c87071b106527b034d8186361d34151e
Interact Ability
Image
Greet Quest Giver Ability
Image
NPC
Image
Quest Machine
Image
User avatar
Tony Li
Posts: 21926
Joined: Thu Jul 18, 2013 1:27 pm

Re: Opsive FCC Integration Not Pulling Focus on Dialogue Start

Post by Tony Li »

Hi,

Does the included example scene work correctly?

Are there any errors or warnings in the Console window? (You may need to untick the Quest Machine GameObject's Debug checkbox to hide those log messages for now.)

Make sure you've assigned the GreetingQuestGiverUnityInputPreset asset to your player's UnityInput component.

Open the QuestGiverInteractableTarget script in your code editor, and put a breakpoint on the first line of code in the Interact method, which in your case should start with "var characterNetworkInfo..." since you're using PUN. Then you can step through the method to see if it's getting to the last line, which calls StartDialogueWithPlayer().

Make sure your local player's GameObject is tagged Player. This is how StartDialogueWithPlayer() knows which GameObject is interacting with the quest giver.

If it gets to that line but doesn't activate the player's Greet Quest Giver ability, then as a test try changing that last line to:

Code: Select all

GetComponent<QuestGiver>().StartDialogue(character);
Dtortoise
Posts: 4
Joined: Thu Nov 18, 2021 3:14 pm

Re: Opsive FCC Integration Not Pulling Focus on Dialogue Start

Post by Dtortoise »

The Example scene doesn't let me move around however I am able to access the journal.
demoScene.png
demoScene.png (416.04 KiB) Viewed 972 times
The following errors are thrown when running the scene and I believe it might be due to only having the Ultimate First Person Controller instead of the Ultimate Character Controller.
errorLog1.png
errorLog1.png (118.49 KiB) Viewed 972 times
errorLog2.png
errorLog2.png (159.61 KiB) Viewed 972 times
In my normal scene I have tried adding the breakpoint and the player appears to be starting the dialogue properly
Below I have attached screenshots of the Unity Input Component of the Player prefab
UnityInput.png
UnityInput.png (63.44 KiB) Viewed 972 times
As well as the player and layer

Any help is appreciated. Thanks
Attachments
playerLayer.png
playerLayer.png (15.54 KiB) Viewed 972 times
User avatar
Tony Li
Posts: 21926
Joined: Thu Jul 18, 2013 1:27 pm

Re: Opsive FCC Integration Not Pulling Focus on Dialogue Start

Post by Tony Li »

Hi,

Sorry, I forgot to said FCC, not UCC. Disregard the example scene.

When you interact with the Quest Giver, does the Unity Input component's GreetingQuestGiver state go active?
greetingQuestGiver.png
greetingQuestGiver.png (7.15 KiB) Viewed 969 times
Dtortoise
Posts: 4
Joined: Thu Nov 18, 2021 3:14 pm

Re: Opsive FCC Integration Not Pulling Focus on Dialogue Start

Post by Dtortoise »

The GreetingQuestGiver does not appear to go active using either StartDialogueWithPlayer() or StartDialogue(character)
User avatar
Tony Li
Posts: 21926
Joined: Thu Jul 18, 2013 1:27 pm

Re: Opsive FCC Integration Not Pulling Focus on Dialogue Start

Post by Tony Li »

Hi,

That suggests that the Greet Quest Giver ability isn't receiving the message that dialogue has started.

Can you open GreetQuestGiver.cs in your code editor and add breakpoints to the AbilityStarted() and AbilityStopped() methods? If so, reproduce the problem and let me know if the game is stopping at these breakpoints.

Alternatively, can you send a reproduction project to tony (at) pixelcrushers.com?
User avatar
Tony Li
Posts: 21926
Joined: Thu Jul 18, 2013 1:27 pm

Re: Opsive FCC Integration Not Pulling Focus on Dialogue Start

Post by Tony Li »

Thanks for sending the reproduction project and clear reproduction steps.

I'm summarizing my email reply here:

1. The Greet Quest Giver ability was too low in the prioritized Abilities list. Higher abilities were preventing it from going active. To fix this, just slide Greet Quest Giver up higher.

2. The scene is missing an EventSystem, which is required to interact with Unity UI elements. To fix this, add an EventSystem. (Menu item GameObject > UI > Event System)
Dtortoise
Posts: 4
Joined: Thu Nov 18, 2021 3:14 pm

Re: Opsive FCC Integration Not Pulling Focus on Dialogue Start

Post by Dtortoise »

Thanks for the fix, it seems to be working. I really appreciate all the work that you put into helping me solve this issue.
User avatar
Tony Li
Posts: 21926
Joined: Thu Jul 18, 2013 1:27 pm

Re: Opsive FCC Integration Not Pulling Focus on Dialogue Start

Post by Tony Li »

Happy to help!
Post Reply