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
Greet Quest Giver Ability
NPC
Quest Machine
Opsive FCC Integration Not Pulling Focus on Dialogue Start
Re: Opsive FCC Integration Not Pulling Focus on Dialogue Start
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:
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);
Re: Opsive FCC Integration Not Pulling Focus on Dialogue Start
The Example scene doesn't let me move around however I am able to access the journal.
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 As well as the player and layer
Any help is appreciated. Thanks
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.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 As well as the player and layer
Any help is appreciated. Thanks
- Attachments
-
- playerLayer.png (15.54 KiB) Viewed 979 times
Re: Opsive FCC Integration Not Pulling Focus on Dialogue Start
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?
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?
Re: Opsive FCC Integration Not Pulling Focus on Dialogue Start
The GreetingQuestGiver does not appear to go active using either StartDialogueWithPlayer() or StartDialogue(character)
Re: Opsive FCC Integration Not Pulling Focus on Dialogue Start
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?
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?
Re: Opsive FCC Integration Not Pulling Focus on Dialogue Start
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)
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)
Re: Opsive FCC Integration Not Pulling Focus on Dialogue Start
Thanks for the fix, it seems to be working. I really appreciate all the work that you put into helping me solve this issue.