Custom Controllers and ORK Framework not working well

Announcements, support questions, and discussion for Quest Machine.
Post Reply
DyegoA
Posts: 5
Joined: Wed Feb 13, 2019 5:16 pm

Custom Controllers and ORK Framework not working well

Post by DyegoA »

So I brought this up on the ORK Framework forums and they recommended coming here as well. Here's the situation:

I'm using ORK Framework, a custom player controller, and Quest Machine. (I also hope to be adding in Dialogue System at some point, but we'll jump over that canyon when we get there.) ORK has a system setup where, during an event, custom controls are blocked so that cursor and keyboard controls are returned to the player, so that the player can do thing like use a menu, click on buttons, etc. etc.

The problem with QM's ORK integration is that QM does not seem to listen to ORK's "blocking event" when a QM dialogue is called. I have an object, I have interaction, and when I go to interact with the Quest Giver the Quest Machine dialogue pops up. Unfortunately, I cannot use my mouse or keyboard to accept or decline the dialogue because my custom control went from being blocked by ORK and then unblocked instantly.

The issue seems to stem from timing. There's helpful chaps on the ORK forum helping me with some custom coding that might do the trick, but I was wondering if, in future, something might be done on the QM+ORK bridge that will help others in my situation.

The current suggestion: "startDialogueNode does not wait for Quest Machine dialogue to be finished. You can ask PixelCrusher to add that feature or try modifying StartDialogueStep.CS to wait until dialogue is finished."

Also, since I'm planning to be adding Dialogue System at some point, I imagine the same thing would need to be done for Dialogue System, to get the ORK events to wait until a dialogue is finished. Some sort of message between QM/Dialogue system and ORK that says "dialogue over" I'm assuming.

Anyway, thanks for any help in this regard!
User avatar
Tony Li
Posts: 22108
Joined: Thu Jul 18, 2013 1:27 pm

Re: Custom Controllers and ORK Framework not working well

Post by Tony Li »

Hi,

I'll look into this and get back to you.
DyegoA
Posts: 5
Joined: Wed Feb 13, 2019 5:16 pm

Re: Custom Controllers and ORK Framework not working well

Post by DyegoA »

Tony Li wrote: Sun Apr 12, 2020 4:41 pm Hi,

I'll look into this and get back to you.
Thanks a ton, Tony Li! Here's a link to the discussion on the ORK framework forum with more info, in case it helps. Forgot to put it into my original post.

http://forum.orkframework.com/discussio ... hine-issue
User avatar
Tony Li
Posts: 22108
Joined: Thu Jul 18, 2013 1:27 pm

Re: Custom Controllers and ORK Framework not working well

Post by Tony Li »

Hi,

That's by design, as some devs may not want to block control when the quest journal is open or when showing the dialogue UI. The intent is that you'd set up your own event to block control when the dialogue UI is open, if you want to.

The Quest Machine Extras page has an updated ORK Framework integration package with an additional convenience component named ORKEventsOnPausePlayer that works similarly to the Dialogue System's ORK bridge component. If you add ORKEventsOnPausePlayer to your player prefab(s), it will automatically block control when Quest Machine's dialogue UI is open -- or, more precisely, whenever Quest Machine sends a "Pause Player" message. You don't have to do anything except add it to your player prefab. However, if you want to run extra events when Quest Machine sends "Pause Player" and "Unpause Player", you can assign them to this component.

(Note for future readers: If you're using Quest Machine 1.2.6 or newer, it already includes this updated package.)
DyegoA
Posts: 5
Joined: Wed Feb 13, 2019 5:16 pm

Re: Custom Controllers and ORK Framework not working well

Post by DyegoA »

Thanks so much, Tony Li! It appears to be working for my purposes! Yay! :D
User avatar
Tony Li
Posts: 22108
Joined: Thu Jul 18, 2013 1:27 pm

Re: Custom Controllers and ORK Framework not working well

Post by Tony Li »

Awesome! Glad to help.
Post Reply