Page 1 of 2
Different convsations
Posted: Sat Feb 26, 2022 6:35 pm
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"..
Re: Different convsations
Posted: Sat Feb 26, 2022 7:12 pm
by Tony Li
Re: Different convsations
Posted: Sat Feb 26, 2022 7:34 pm
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
Re: Different convsations
Posted: Sat Feb 26, 2022 7:36 pm
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?"))]
Re: Different convsations
Posted: Sun Feb 27, 2022 10:29 am
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..
Re: Different convsations
Posted: Sun Feb 27, 2022 10:40 am
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.
Re: Different convsations
Posted: Sun Feb 27, 2022 10:55 am
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?
Re: Different convsations
Posted: Sun Feb 27, 2022 10:59 am
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.
Re: Different convsations
Posted: Sun Feb 27, 2022 11:04 am
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
Re: Different convsations
Posted: Sun Feb 27, 2022 11:58 am
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…