How to prevent a dialogue node from being repeated once it has been seen?

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
ORCONECTESLIMOSUS
Posts: 11
Joined: Sun Jan 19, 2025 11:26 am

How to prevent a dialogue node from being repeated once it has been seen?

Post by ORCONECTESLIMOSUS »

Heyo!
I already got an answer for this (use bool variables) but it really is unfeasible in my case. I have hundreds of conversations and i would need an absurd amount of bool variables. Dialogue is also random (randomize next entry), so I can't have an increasing number variable.

What's the right solution for such a thing? I'm sure I could come up with some janky system, but there has to be a simple solution...
User avatar
Tony Li
Posts: 23251
Joined: Thu Jul 18, 2013 1:27 pm

Re: How to prevent a dialogue node from being repeated once it has been seen?

Post by Tony Li »

Hi,

Note: You don't need to define Dialogue System variables ahead of time. If a variable isn't defined in the dialogue database, its value is "nil". So in Conditions you can check:

Code: Select all

Variable["SomeNPC.Talked"] ~= true
This will pass if the variable is false or not defined yet.

Then you can set it true:

Code: Select all

Variable["SomeNPC.Talked"] = true
Alternatively, use SimStatus. This way you don't need to touch variables at all.

Code: Select all

Dialog[thisID].SimStatus ~= "WasDisplayed"
ORCONECTESLIMOSUS
Posts: 11
Joined: Sun Jan 19, 2025 11:26 am

Re: How to prevent a dialogue node from being repeated once it has been seen?

Post by ORCONECTESLIMOSUS »

wow, thanks!
simStatus is probably the right call, since i have short sequences with lots of branches.
User avatar
Tony Li
Posts: 23251
Joined: Thu Jul 18, 2013 1:27 pm

Re: How to prevent a dialogue node from being repeated once it has been seen?

Post by Tony Li »

Glad to help!
Post Reply