Page 1 of 1

Conversation node's Lua Script and Articy import

Posted: Thu May 07, 2020 8:44 am
by undecode
Hi, I was wondering if there is any way to set my Lua Scripts (the ones showing in each conversation node) in Articy, so I don't have to add them manually in Unity later?

I've searched in the docs but didn't find anything https://www.pixelcrushers.com/dialogue_ ... draft.html

I also see there is an option called "Other Script Fields" in the Articy:draft importer tool, but I think it's related to expresso scripts?

Thanks in advance

Re: Conversation node's Lua Script and Articy import

Posted: Thu May 07, 2020 10:15 am
by Tony Li
Hi,

You can enter Lua code anywhere that you'd normally use articy:expresso code in articy, such as input/output pins and instruction nodes. Articy will flag it as not expresso code, but the Dialogue System will use it just fine.

'Other Script Fields' serves a slightly different purpose. It isn't used in dialogue entries' Conditions and Script fields. If your articy project has custom properties that contain expresso code, you can specify them in 'Other Script Fields' to tell the Dialogue System to translate them into Lua. One example is including expresso code in a custom property on quests so you can run that custom code when the player completes the quest.

Re: Conversation node's Lua Script and Articy import

Posted: Thu May 07, 2020 11:46 am
by undecode
I just checked and input/output pins are indeed translated as scripts.

Now, I know this is more related to articy:draft, but is there any way to NOT create namespaces for global variables?

In the end I want something like

Code: Select all

Variable["CurrentChapter"] ="Chapter2"
.
But with a namespace i'll have it always append it like

Code: Select all

Variable["Namespace.CurrentChapter"] ="Chapter2"
.

I guess it's not a bad idea to use namespaces, but right now I don't think it'll be neccesary in my setup.
Is it possible?

Thanks!

Re: Conversation node's Lua Script and Articy import

Posted: Thu May 07, 2020 1:13 pm
by Tony Li
No, it's not possible. Articy always uses namespaces (i.e., variable groups).

Re: Conversation node's Lua Script and Articy import

Posted: Thu May 07, 2020 1:54 pm
by undecode
Ok, good to know. Thanks Tony