Different convsations

Announcements, support questions, and discussion for the Dialogue System.
hrohibil
Posts: 369
Joined: Thu Nov 04, 2021 12:50 pm

Different convsations

Post by hrohibil »

Hello there

How do i setup so if player returns to same speaker and if he already heard the first conversation or got quest then I just want a random reply like " Ohh.. You again"..
User avatar
Tony Li
Posts: 22149
Joined: Thu Jul 18, 2013 1:27 pm

Re: Different convsations

Post by Tony Li »

hrohibil
Posts: 369
Joined: Thu Nov 04, 2021 12:50 pm

Re: Different convsations

Post by hrohibil »

Thank you for the link.

It seems quickly looking at it that the latter option sounds sweeter if I want to have different talks/branches each time he returns I can just equal that variable with the number I want.

What if after first time visit I want the reply to loop between two nodes?
Like “ oh you again” and the other “ still around eh”… Maybe even have more and then if it could pick a random each time?
Cheers
User avatar
Tony Li
Posts: 22149
Joined: Thu Jul 18, 2013 1:27 pm

Re: Different convsations

Post by Tony Li »

There are two ways to pick a random line.

1. Put "RandomizeNextEntry()" in the Script field of the previous node. It will pick randomly from the next set of nodes.

2. Or use [lua(RandomElement(...))] in the text. Example:

- Dialogue Text: [lua(RandomElement("Oh you again | Still around eh?"))]
hrohibil
Posts: 369
Joined: Thu Nov 04, 2021 12:50 pm

Re: Different convsations

Post by hrohibil »

Ok

I ran into issue

My first setup worked, with one conversations, so when player approached the NPC, a yellow bar appears, i click and talk with the NPC.

Now i tried to setup so if player camas back a second conversation should play.
See my settings.
Now nothing works, when i get to the NPC i still get the yellow text indicating i can interact with the NPC when pressing SPACE.
Now SPACE only makes the chracter jump.. No convasations anymore..


User avatar
Tony Li
Posts: 22149
Joined: Thu Jul 18, 2013 1:27 pm

Re: Different convsations

Post by Tony Li »

Hi,

Change the Script to:

Code: Select all

Variable["FirstStopTalk"] = Variable["FirstStopTalk"] + 1
In the future, I recommend using the "..." dropdown menu to set up Conditions and Scripts to avoid typos.
hrohibil
Posts: 369
Joined: Thu Nov 04, 2021 12:50 pm

Re: Different convsations

Post by hrohibil »

Thank you for reply..

So in my conversation I have this now.
But as i approach i am back to only the yellow indicator starts, no interaction or anything..

Do i understand it correct, that i also need to have the variable FirstStopTalk declared in the VARIABLES panel right?

User avatar
Tony Li
Posts: 22149
Joined: Thu Jul 18, 2013 1:27 pm

Re: Different convsations

Post by Tony Li »

Yes, add it to your dialogue database, or change your first node's Conditions. If you don't define the variable, its value will be nil.
hrohibil
Posts: 369
Joined: Thu Nov 04, 2021 12:50 pm

Re: Different convsations

Post by hrohibil »

I did that already



But still same result...

So a quick run down.

1: I have one conversation with two branches.
2: I have declared a VARIABLE called "FirstStopTalk" in the variable tab.
3: I have not added/edited/modified the Dialouge system Trigger on the NPC. (Likie i said it worked befoe)
4: In the convasation node that starts right after the YELLOW start i have inserted the conditions and script code like you provided... On the second node I copyed over same code but with an 1 instead of an 0.

Still nothing happends
hrohibil
Posts: 369
Joined: Thu Nov 04, 2021 12:50 pm

Re: Different convsations

Post by hrohibil »

I understand you are busy Tony.
And you have always been beyond supportive.

When you have time I really appreciate you take a look as I really need this setup..

Thank you…
Post Reply