Page 1 of 1

Variable stopped working

Posted: Sat Jun 10, 2023 6:56 pm
by Eldritch_Horror
I was working on adding a rudimentary quest, and my previously working variable stopped triggering converation. The variable still shows up in the Variables of the Dialogue screen. But apparently it no longer wants to function. Any ideas?

Re: Variable stopped working

Posted: Sat Jun 10, 2023 10:18 pm
by Tony Li
Hi,

It might be the sync options in the Adventure Creator Bridge component.

When the conversation starts, "Copy AC Variables To Dialogue System" copies the values of all AC variables to the Dialogue System's Variable[] table. Presumably this includes "GumInLock".

When the conversation ends, "Copy Dialogue System to AC Variables" copies the values of the Dialogue System's Variable[] table back to AC, overwriting the current values of the AC variables.

During the conversation, you can change the Dialogue System version of GumInLock, and those changes will be copied back to the corresponding AC variable at the end of the conversation.

However, if you change the AC variable while the conversation is active, that change will get overwritten by the Dialogue System's Variable[] table when the conversation ends.

Re: Variable stopped working

Posted: Sun Jun 11, 2023 1:52 pm
by Eldritch_Horror
Ive been editing the To Dialogue System and Back to AC checks, but havent had any luck. Ive tried creating a new variable in the Dialogue Variables, and same issue.

Re: Variable stopped working

Posted: Sun Jun 11, 2023 2:51 pm
by Eldritch_Horror
I have noticed that if I inspect the lock to change the variable to true, then talk to the character there's no lock dialogue option. If I exit the conversation, then start it again, then there lock dialogue option is there.

Re: Variable stopped working

Posted: Sun Jun 11, 2023 4:06 pm
by Tony Li
Hi,

If you're watching the Dialogue System variable's value in the Dialogue Editor's Variables section, it won't change at runtime. That's the initial starting value. To see the current runtime value, use the Watches section (select Menu > Add All Runtime Variables) or the separate Variable Viewer window accessible through menu item Tools > Pixel Crushers > Dialogue System > Tools > Variable Viewer.

As a test, try UNticking the Adventure Creator Bridge component's Sync Settings > Back To AC > Copy Dialogue System To AC Variables checkbox. This will prevent the Dialogue System from overwriting AC's variable values.