Page 1 of 2
[SOLVED] Automatically hide an answer already made.
Posted: Wed Dec 16, 2015 4:50 pm
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!
Re: Automatically hide an answer already made.
Posted: Wed Dec 16, 2015 9:25 pm
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"
Re: Automatically hide an answer already made.
Posted: Thu Dec 17, 2015 4:21 pm
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
Re: Automatically hide an answer already made.
Posted: Thu Dec 17, 2015 8:13 pm
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).
Re: Automatically hide an answer already made.
Posted: Fri Dec 18, 2015 5:25 pm
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?
Re: Automatically hide an answer already made.
Posted: Fri Dec 18, 2015 5:27 pm
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?
Re: Automatically hide an answer already made.
Posted: Fri Dec 18, 2015 6:46 pm
by miguelfanclub
Forgive me Tony. Im really dumb. Obviously, "and" / "or" must be well placed.
Re: Automatically hide an answer already made.
Posted: Fri Dec 18, 2015 11:29 pm
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?
Re: Automatically hide an answer already made.
Posted: Sat Dec 19, 2015 9:18 am
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()?
Re: [SOLVED] Automatically hide an answer already made.
Posted: Wed Mar 16, 2016 8:01 pm
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.