[SOLVED] Automatically hide an answer already made.

Announcements, support questions, and discussion for the Dialogue System.
miguelfanclub
Posts: 43
Joined: Sat Nov 28, 2015 4:09 pm

[SOLVED] Automatically hide an answer already made.

Post by miguelfanclub »

Is there a way to automatically hide an answer already made once you have gone through the entire branch of the inicial node dialogue?
I want to create the usual dialogue where the player has different choices. Everytime the player choose one and go through it until the end, the dialogue starts all over again without that already selected option.

I know how to do it via false condition action, but that implies create a variable for every player answer node.

Is there any other easy way? If not, that could be a cool feature to add under the group that contains certains childs of a dialogue answers.

Thanks!
Last edited by miguelfanclub on Sat Dec 19, 2015 1:27 pm, edited 1 time in total.
User avatar
Tony Li
Posts: 21050
Joined: Thu Jul 18, 2013 1:27 pm

Re: Automatically hide an answer already made.

Post by Tony Li »

Hi Miguel,

Yes, on the Dialogue Manager GameObject tick Include Sim Status.

This will automatically add a variable Dialog[#].SimStatus for every dialogue entry, where # is the dialogue entry's ID. The variable's value will be:
  • "WasOffered": If the entry was offered to the player in a response menu,
  • "WasDisplayed": If the entry was spoken by an actor (e.g., the player chose it), or
  • "Untouched": Otherwise.
Example: If the dialogue entry ID is 42, set the Conditions to:

Code: Select all

Dialog[42].SimStatus ~= "WasDisplayed"
miguelfanclub
Posts: 43
Joined: Sat Nov 28, 2015 4:09 pm

Re: Automatically hide an answer already made.

Post by miguelfanclub »

Thanks Tony, it works... but whats the way to have 2 conditions? It only works if its the first one so I guess second one will not work anymore.
I have it like this now:

http://puu.sh/lZnRJ/5d81a68b9c.png
User avatar
Tony Li
Posts: 21050
Joined: Thu Jul 18, 2013 1:27 pm

Re: Automatically hide an answer already made.

Post by Tony Li »

Hi Miguel,

Put the word "and" between the conditions:

Code: Select all

Dialog[20].SimStatus ~= "WasDisplayed" and Variable["want_drink"] == false
I like to use parentheses to make the conditions easier to see:

Code: Select all

(Dialog[20].SimStatus ~= "WasDisplayed") and (Variable["want_drink"] == false)

You can also use the word "or" if only one of the conditions needs to be true:

Code: Select all

(Variable["has_red_key"] == true) or (Variable["has_blue_key"] == true)
The condition above is true if the player has the red key or the blue key (or both).
miguelfanclub
Posts: 43
Joined: Sat Nov 28, 2015 4:09 pm

Re: Automatically hide an answer already made.

Post by miguelfanclub »

Thanks Tony... but cant make it work. Whenever I have two conditions, seems to not to work, both of them. If I just put one of them, then it does.
Am I missing something?
User avatar
Tony Li
Posts: 21050
Joined: Thu Jul 18, 2013 1:27 pm

Re: Automatically hide an answer already made.

Post by Tony Li »

Miguel,

Try the parentheses and put it all on one line, like:

Code: Select all

(Dialog[20].SimStatus ~= "WasDisplayed") and (Variable["want_drink"] == false)
If that doesn't work, would you please post the Conditions field?

Also, what's being printed to the Console view?
miguelfanclub
Posts: 43
Joined: Sat Nov 28, 2015 4:09 pm

Re: Automatically hide an answer already made.

Post by miguelfanclub »

Forgive me Tony. Im really dumb. Obviously, "and" / "or" must be well placed. :lol:
Roncin
Posts: 11
Joined: Sun Aug 17, 2014 10:17 pm

Re: Automatically hide an answer already made.

Post by Roncin »

Variant:
How do you handle a different conversation?
For example your in conversation ID 10 node 10 and you want to hide the jump to conversation ID 21 node 2?
User avatar
Tony Li
Posts: 21050
Joined: Thu Jul 18, 2013 1:27 pm

Re: Automatically hide an answer already made.

Post by Tony Li »

Roncin wrote:Variant:
How do you handle a different conversation?
For example your in conversation ID 10 node 10 and you want to hide the jump to conversation ID 21 node 2?
Use Conversation[X].Dialog[Y] where X is the conversation ID and Y is the dialogue entry ID in that conversation.

EDIT: Sorry, I completely misunderstood your question. What about setting the hub node's Sequence to None()?
User avatar
Squimon
Posts: 4
Joined: Wed Mar 16, 2016 7:45 pm

Re: [SOLVED] Automatically hide an answer already made.

Post by Squimon »

Hi Tony & All,

I apologise if this is a stupid question.

When using these variables to hide an answer, does it hide the node called across all conversations or just the individual conversation in which the condition has been input?

e.g. If I'm using

Code: Select all

(Dialog[56].SimStatus ~= "WasDisplayed")
to hide node 56 in one conversation, does it also hide node 56 in all conversations for that database?

I might be setting up these conditions wrong, I've been noticing some nodes are already hidden upon initializing other conversations in my database.

Thanks.
Post Reply