Search found 5 matches

by buhubuhu
Fri Mar 12, 2021 11:27 am
Forum: Dialogue System for Unity
Topic: C# bool to lua?
Replies: 9
Views: 763

Re: C# bool to lua?

Ok, I think I finally starting to understand it. I make it like that:

Code: Select all

public bool GetIsFollowing()
    {
        return DialogueManager.currentConversant.gameObject.GetComponent<Knight>().isFollowing;
    }
and I registered it on player.

Looks like it working.

Thanks. :)
by buhubuhu
Fri Mar 12, 2021 10:58 am
Forum: Dialogue System for Unity
Topic: C# bool to lua?
Replies: 9
Views: 763

Re: C# bool to lua?

I put it on NPC script. All of them is active, all of them have the same dialog triggers and the same conversation. They are not Don't Destroy On Load. Actually I think about it now and I guess that is the problem... previously I was registering and checking on player. Now I want to have bool check ...
by buhubuhu
Fri Mar 12, 2021 10:45 am
Forum: Dialogue System for Unity
Topic: C# bool to lua?
Replies: 9
Views: 763

Re: C# bool to lua?

I got this error:
Dialogue System: Lua code 'return GetIsFollowing() == false' threw exception 'Tried to invoke a function call on a non-function value. If you're calling a function, is it registered with Lua?'
by buhubuhu
Fri Mar 12, 2021 10:28 am
Forum: Dialogue System for Unity
Topic: C# bool to lua?
Replies: 9
Views: 763

Re: C# bool to lua?

Sorry for long break... I had to deal with different problems and now I comeback to this one. So... I guess that I'm to stupid. I understand how to do it on dialog tab side but I have no idea how I suppose to register this. I already registered string and int (its in tutorial so I just follow it) bu...
by buhubuhu
Mon Feb 15, 2021 8:24 am
Forum: Dialogue System for Unity
Topic: C# bool to lua?
Replies: 9
Views: 763

C# bool to lua?

I'm not very experienced in coding. Need some help. I have player, player have script and bool in it. And now I want - when this bool is true or false converstation with npc starts with different sentence. This whole lua thing is very confusing for me and I don't understand how can I do that - sorry...