Way to Disable Starting a Conversation with a Window Open?

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
DrewThomasArt
Posts: 60
Joined: Thu Mar 24, 2022 12:07 am

Way to Disable Starting a Conversation with a Window Open?

Post by DrewThomasArt »

I want to disable the ability to start conversations when things like shops and inventory pages are open.
Is there a simple way to do this?
I was thinking about doing something like disabling "usable" component on all objects with "NPC" tag when opening windows, but I'm thinking there might be a more effective way or maybe something built in to the Dialogue System? Which might be good to know for future use.
Thanks!
User avatar
Tony Li
Posts: 22110
Joined: Thu Jul 18, 2013 1:27 pm

Re: Way to Disable Starting a Conversation with a Window Open?

Post by Tony Li »

Hi,

If the player can only trigger Usable components using a Selector or Proximity Selector component, you can disable the Selector/Proximity Selector when windows are open.

If the player can trigger Dialogue System Triggers in other ways, you can make and use a subclass of DialogueSystemTrigger that overrides the TryStart() method. If windows are open, exit immediately; otherwise call the base TryStart() method.
DrewThomasArt
Posts: 60
Joined: Thu Mar 24, 2022 12:07 am

Re: Way to Disable Starting a Conversation with a Window Open?

Post by DrewThomasArt »

Tony Li wrote: Sun Apr 09, 2023 8:22 am Hi,

If the player can only trigger Usable components using a Selector or Proximity Selector component, you can disable the Selector/Proximity Selector when windows are open.

If the player can trigger Dialogue System Triggers in other ways, you can make and use a subclass of DialogueSystemTrigger that overrides the TryStart() method. If windows are open, exit immediately; otherwise call the base TryStart() method.
Disabling the Proximity Selector works like a charm, thanks!
User avatar
Tony Li
Posts: 22110
Joined: Thu Jul 18, 2013 1:27 pm

Re: Way to Disable Starting a Conversation with a Window Open?

Post by Tony Li »

Glad to help!
Post Reply