Page 1 of 1

Snycing Behavior Designer Variables with DSU

Posted: Wed Jul 10, 2019 8:48 pm
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?

Re: Snycing Behavior Designer Variables with DSU

Posted: Wed Jul 10, 2019 9:25 pm
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.

Re: Snycing Behavior Designer Variables with DSU

Posted: Thu Jul 11, 2019 3:00 pm
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.

Re: Snycing Behavior Designer Variables with DSU

Posted: Thu Jul 11, 2019 3:15 pm
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.