Conversation node's Lua Script and Articy import

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
undecode
Posts: 25
Joined: Mon Apr 13, 2020 3:53 pm

Conversation node's Lua Script and Articy import

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

Re: Conversation node's Lua Script and Articy import

Post 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.
undecode
Posts: 25
Joined: Mon Apr 13, 2020 3:53 pm

Re: Conversation node's Lua Script and Articy import

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

Re: Conversation node's Lua Script and Articy import

Post by Tony Li »

No, it's not possible. Articy always uses namespaces (i.e., variable groups).
undecode
Posts: 25
Joined: Mon Apr 13, 2020 3:53 pm

Re: Conversation node's Lua Script and Articy import

Post by undecode »

Ok, good to know. Thanks Tony
Post Reply