Page 1 of 1
Way to Disable Starting a Conversation with a Window Open?
Posted: Sun Apr 09, 2023 8:02 am
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!
Re: Way to Disable Starting a Conversation with a Window Open?
Posted: Sun Apr 09, 2023 8:22 am
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.
Re: Way to Disable Starting a Conversation with a Window Open?
Posted: Sun Apr 09, 2023 9:33 am
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!
Re: Way to Disable Starting a Conversation with a Window Open?
Posted: Sun Apr 09, 2023 9:42 am
by Tony Li
Glad to help!