NPCS starting lines don´t change via conditions

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
sofia_sbr
Posts: 13
Joined: Thu Jul 09, 2020 5:27 am

NPCS starting lines don´t change via conditions

Post by sofia_sbr »

Hey peeps,

I wanted to play around with the dialogue manager and made a simple conversation between the NPC and the player. The NPC would have different starting lines, depending on whether the player "accepted" a task or not.

Here´s the summary (image below):
After NPC says "how you doing" I set the quest state to unnasigned
When Player selects "great (take quest), I set the quest state to assigned
I then linked the 2nd NPC starting line "Thanks for accepting the q" with the condition quest == assigned

However even after the player accepts the quest, the nps uses the same lines that are called during the condition "quest unassigned". I tried it then again with bool variables, but that also doesn´t help.

I checked the conditions and scripts tab, to make sure the quest state was being changed or checked. So I´m a bit confused, what am I doing wrong?

Image
sofia_sbr
Posts: 13
Joined: Thu Jul 09, 2020 5:27 am

Re: NPCS starting lines don´t change via conditions

Post by sofia_sbr »

UPDATE:
Lines change now using altered quest conditions
But for some reason they don´t change when I use bools? Anyone any idea?
User avatar
Tony Li
Posts: 22054
Joined: Thu Jul 18, 2013 1:27 pm

Re: NPCS starting lines don´t change via conditions

Post by Tony Li »

Hi,

What are the values of your Conditions and Script fields? (In the conversation(s) that don't work.)
sofia_sbr
Posts: 13
Joined: Thu Jul 09, 2020 5:27 am

Re: NPCS starting lines don´t change via conditions

Post by sofia_sbr »

Hi Tony,

for some reason the bools work now, after I restarted unity (I´m not sure what happened).
The first conversation line had "Variable["Talked"] == false" and the other "Variable["Talked"] == true".
At the end of the first conversation, the players responde had the script "Variable["Talked"] = true",

But again, now it´s working again.
User avatar
Tony Li
Posts: 22054
Joined: Thu Jul 18, 2013 1:27 pm

Re: NPCS starting lines don´t change via conditions

Post by Tony Li »

Hi,

I'm glad it's working. Perhaps the wrong database was assigned, or something like that. If you notice any new issues, just let me know.
Post Reply