Snycing Behavior Designer Variables with DSU

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
pegassy
Posts: 135
Joined: Sat Mar 17, 2018 8:07 pm

Snycing Behavior Designer Variables with DSU

Post by pegassy »

Hello,

I have been looking into synchronizing Behavior Designer variables into DSU. Namely, I have a variable named "Friendly" which is true by default, and certain dialogue options will make this false. This partially works, however, I noticed you mentioned in the integration documentation that the synchronization only occurs during start and end of conversations. I would like to be able to make changes at other times too, namely using enable or onuse functions of Dialogue System Triggers with a Lua command use.

You mentioned in the documentation that there are two functions: SyncToLua() or SyncFromLua(). However, as I understand these are C# commands and not Lua commands, is that right? Is there any way to update these variables via Lua commands, or do I need to call a c# script in order to do that?
User avatar
Tony Li
Posts: 20803
Joined: Thu Jul 18, 2013 1:27 pm

Re: Snycing Behavior Designer Variables with DSU

Post by Tony Li »

Hi,

In the next update (which I'm hoping to finish near the end of next week), I can add Lua functions to sync and/or get & set Behavior Designer variables.
pegassy
Posts: 135
Joined: Sat Mar 17, 2018 8:07 pm

Re: Snycing Behavior Designer Variables with DSU

Post by pegassy »

Wonderful.

I suspect syncing continously or regularly would be consuming too much performance? But I think syncing everytime I need to update the variable works just as fine.

Thank you.
User avatar
Tony Li
Posts: 20803
Joined: Thu Jul 18, 2013 1:27 pm

Re: Snycing Behavior Designer Variables with DSU

Post by Tony Li »

Correct; it wouldn't be efficient to continuously sync. I'll try to add functions to sync on demand and also to access BT variables directly if you prefer.
Post Reply