Where i can find Dialogue Lua api

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Fitbie
Posts: 44
Joined: Tue Dec 07, 2021 6:30 pm

Where i can find Dialogue Lua api

Post by Fitbie »

Hi, Tony!
I found a handy function called Lua.Run(). I could use a serializable field and write any code in the inspector to run.
But I can't find a complete list of Lua methods anywhere. Only a few are listed in your documentation.
For example I would like to start a conversation with a specific id through Lua code.

Where can i find Dialogue Lua api?
Thank you!
User avatar
Tony Li
Posts: 21684
Joined: Thu Jul 18, 2013 1:27 pm

Re: Where i can find Dialogue Lua api

Post by Tony Li »

Hi,

There isn't a built-in Lua function to start a conversation, but you could register a C# method with Lua to do that.

The primary Lua functions are here and the special variables are here. In addition, you can generally use regular Lua functions, too (reference).

In C#, use the DialogueLua class to set Lua variables, actor fields, etc.
Post Reply