Page 1 of 1

UIS Opsive, Quest Machine = No Cursor

Posted: Wed Jan 26, 2022 5:47 am
by joe1512
I know in game there are multiple ways to turn on and off the cursor such as ( Playmaker , Game settings simple & Opsive )

I have it set so the game loads and there is no cursor ( Perfect ) the player opens there Opsive Inventory System and a cursor immediately shows ( Perfect ) then they close the inventory and the cursor vanishes ( Perfect ) however when the player walks up to a mission no cursor shows and when the player opens the Journal no cursor shows.

In a perfect world I would like the journal to be apart of the opsive inventory ui so the player can just control everything from there but it doesn't seem to like each other and it doesn't show the journal ui when that happens. I would settle with pressing j opens the Journal (what I currently have) however it doesn't show the cursor... any ideas?

Packages :
Opsive Inventory System, Quest Machine, Dialogue system, Malbers anims, Playmaker, I have also attached all Bridges required from opsive themselves.

Re: UIS Opsive, Quest Machine = No Cursor

Posted: Wed Jan 26, 2022 8:57 am
by Tony Li
Hi,

You can find a reminder of the setup steps in Pixel Crushers/Quest Machine/Third Party Support/Opsive UCC support/Opsive_UCC_Support.pdf.

For Quest Machine, there are two times when you want to show and hide the cursor:
  • Quest Journal UI: Add an Enable Cursor While Active component to the Quest Machine GameObject's Quest Journal UI child GameObject.
  • Quest Dialogue UI: Add a Greet Quest Giver ability to the player's Ultimate Character Locomotion component. Slide it up pretty high in the list, above your Interact abilities, so lower abilities such as Idle don't override it.
For the Dialogue System, add a Converse ability to the player's Ultimate Character Locomotion component. Slide it up pretty high in the list, just below Greet Quest Giver.

It's fine to make the journal a part of your UIS inventory UI. You can add a button to the UIS Inventory System Canvas's Menu Tabs section. Add a QuestJournalButton component to the button, and configure the ActionButton's OnClickEvent() to call QuestJournalButton.ToggleJournalUI.

Re: UIS Opsive, Quest Machine = No Cursor

Posted: Wed Jan 26, 2022 10:19 am
by joe1512
Thanks for the reply, However the script "enable cursor while active" I don't seem to have?

Re: UIS Opsive, Quest Machine = No Cursor

Posted: Wed Jan 26, 2022 11:25 am
by Tony Li
Have you downloaded UCC's Quest Machine integration from opsive.com and imported it?

Re: UIS Opsive, Quest Machine = No Cursor

Posted: Wed Jan 26, 2022 12:41 pm
by joe1512
yes its the ones below correct? I am only using Ultimate Inventory System, would I need to use UCC is that why I'm missing some scripts?

Re: UIS Opsive, Quest Machine = No Cursor

Posted: Wed Jan 26, 2022 1:17 pm
by Tony Li
Yes, use those two integrations. Try adding a script like this to the quest journal:

ShowCursorWhileEnabled.cs

Code: Select all

using UnityEngine;
public class ShowCursorWhileEnabled : MonoBehaviour
{
    void OnEnable() { PixelCrushers.CursorControl.SetCursorActive(true); }
    void OnDisable() { PixelCrushers.CursorControl.SetCursorActive(false); }
}

Re: UIS Opsive, Quest Machine = No Cursor

Posted: Wed Jan 26, 2022 1:28 pm
by joe1512
Worked perfectly thanks, should I have a word with opsive as to why they don't have that script in the package?

- Can be marked as solved

Re: UIS Opsive, Quest Machine = No Cursor

Posted: Wed Jan 26, 2022 1:40 pm
by Tony Li
We maintain the integration over here and send the package to Opsive for them to host on their site. I'll drop that script into the next version of the integration package that I send them.