Page 1 of 1

Missing Lua functions

Posted: Mon Oct 04, 2021 2:23 pm
by tootyboi95
Hi Tony,

I have been enjoying your package alot. I apologize for bombarding you with so many questions; I have been working on the suggestions you have been giving concurrent to these issues that I have been facing. I can't seem to find similar issues in the forum for this particular issue, so here it is.

I am currently using Dialogue System Integration with Quest Machine. It seems like I have been getting this error when I attempted to use some of the Lua functions. This is really weird as I thought that these lua functions should be available as per the documentation given. I have also made sure to follow the tutorial on which gameobjects to attach to the dialogue manager and quest machine gameobjects here . (I.e. 'Common Library Lua' and 'Dialogue System Quest Machine Bridge' on Dialogue manager gameobject, 'Dialogue System Quest Dialogue UI' and 'Dialogue System Quest Alert UI' on Quest Machine Gameobject.)
Dialogue System: Lua code 'SendMessageSystem("Talked", "Girl")' threw exception 'Tried to invoke a function call on a non-function value. If you're calling a function, is it registered with Lua?'
Any thoughts on this? Thanks!

Re: Missing Lua functions

Posted: Mon Oct 04, 2021 2:56 pm
by Tony Li
Hi,

When you start the conversation, pause the game. Inspect the Dialogue Manager GameObject, and double check that it has a Common Library Lua component.

Note that the Dialogue Manager GameObject, like the Quest Machine GameObject, survives scene changes. This means the first Dialogue Manager to come into play will stick around and supplant any Dialogue Managers in subsequently loaded scenes. Make sure this first Dialogue Manager has a Common Library Lua component.

Re: Missing Lua functions

Posted: Tue Oct 05, 2021 11:45 am
by tootyboi95
Hi Tony,

Thanks for the reply. Interestingly, there is a Lua component that persists between scene. I reimported the Dialogue System asset and it finally worked (I might have imported Dialogue System a long time ago). Thanks!

Re: Missing Lua functions

Posted: Tue Oct 05, 2021 1:04 pm
by Tony Li
I'm glad it's working now!