Variable stopped working

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Eldritch_Horror
Posts: 28
Joined: Sun May 28, 2023 8:30 pm

Variable stopped working

Post 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?
Attachments
Clipboard03.png
Clipboard03.png (178.48 KiB) Viewed 513 times
Clipboard02.png
Clipboard02.png (164.02 KiB) Viewed 513 times
Clipboard01.png
Clipboard01.png (473.12 KiB) Viewed 513 times
User avatar
Tony Li
Posts: 22131
Joined: Thu Jul 18, 2013 1:27 pm

Re: Variable stopped working

Post 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.
Eldritch_Horror
Posts: 28
Joined: Sun May 28, 2023 8:30 pm

Re: Variable stopped working

Post 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.
Last edited by Eldritch_Horror on Sun Jun 11, 2023 2:54 pm, edited 1 time in total.
Eldritch_Horror
Posts: 28
Joined: Sun May 28, 2023 8:30 pm

Re: Variable stopped working

Post 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.
User avatar
Tony Li
Posts: 22131
Joined: Thu Jul 18, 2013 1:27 pm

Re: Variable stopped working

Post 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.
Post Reply