Page 1 of 1
Disable(Hide) response option based on condition
Posted: Thu Sep 22, 2022 8:03 am
by Ekta Bhutwala
Hii..
I am doing Quest to find key of the door.
My story is like when i click on door first time, Quest is in Unassigned state. but after click on the door first time, conversation dialog is shown
"This Room is locked and I need a key for this." and i am changing state of the quest to active.
Image i am attaching for whole tree.
Here I have selected left side node which i want to execute when state is unassigned and right side node i want to execute when Quest become success.
I have added condition to check quest state on right side node also.
But it is showing me in response option in disable button form. where as i want to show only one dialog based on condition.
Thanks i hope i make you understand my problem.
Re: Disable(Hide) response option based on condition
Posted: Thu Sep 22, 2022 10:56 am
by Tony Li
Hi,
I will assume your quest's Name is "Get storeroom key".
In the left node, set Conditions to:
Code: Select all
CurrentQuestState("Get storeroom key") == "unassigned"
(You can use the "..." dropdown menus to do this; you don't have to type it manually if you don't want to.)
Set the left node's Script to:
Code: Select all
SetQuestState("Get storeroom key", "active")
---
In the right node, set Conditions to:
Code: Select all
CurrentQuestState("Get storeroom key") == "active"
Re: Disable(Hide) response option based on condition
Posted: Thu Sep 22, 2022 2:52 pm
by Ekta Bhutwala
Hii
But it's showing me both option with disable button. I don't want to show option who's condition does not get true (for this conversation only)
Re: Disable(Hide) response option based on condition
Posted: Thu Sep 22, 2022 2:57 pm
by Tony Li
Hi,
Understood. Inspect the conversation in the Dialogue Editor. Select Menu > Conversation Properties. Tick Override Display Settings > Input Settings. Then leave the "Include Invalid Responses" checkbox unticked. This will only apply to this conversation.
Re: Disable(Hide) response option based on condition
Posted: Thu Sep 22, 2022 3:20 pm
by Ekta Bhutwala
you can see the output. i don;t want to show second option whose condition is false right now
Re: Disable(Hide) response option based on condition
Posted: Thu Sep 22, 2022 3:23 pm
by Tony Li
Make sure you're editing the correct database.
What are the Conditions on both nodes? Are they what I suggested above?
Re: Disable(Hide) response option based on condition
Posted: Thu Sep 22, 2022 3:34 pm
by Ekta Bhutwala
Yes sir. i checked twice. It's same as you said.
Re: Disable(Hide) response option based on condition
Posted: Thu Sep 22, 2022 4:03 pm
by Tony Li
Re: Disable(Hide) response option based on condition
Posted: Fri Sep 23, 2022 1:25 am
by Ekta Bhutwala
Hello sir. Thanks for the demo. but it's showing me the same result. evenif override the input setting for conversation, showing invalid responses.
Re: Disable(Hide) response option based on condition
Posted: Fri Sep 23, 2022 12:01 pm
by Tony Li
In a clean project with just the Dialogue System and this example, this is what happens:
- doorExample.png (52.55 KiB) Viewed 343 times
Isn't that what you want to happen?
Notes:
- The Dialogue Manager's Display Settings > Input Settings > Include Invalid Entries is TICKED.
- The conversation's Override Display Settings > Input Settings > Include Invalid Entries is UNTICKED.