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!
Way to Disable Starting a Conversation with a Window Open?
-
- Posts: 60
- Joined: Thu Mar 24, 2022 12:07 am
Re: Way to Disable Starting a Conversation with a Window Open?
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.
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.
-
- Posts: 60
- Joined: Thu Mar 24, 2022 12:07 am
Re: Way to Disable Starting a Conversation with a Window Open?
Disabling the Proximity Selector works like a charm, thanks!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.