Page 1 of 1

DialogueLug getting the value wrong in Dialogue Node

Posted: Sat Jan 23, 2021 2:11 am
by fkkcloud
I am setting dialogue value before the start of conversation like this below.

Code: Select all

        DialogueLua.SetVariable("DUNGEON_AVAILABLE", isDungeonAvailable);
        Debug.Log(DialogueLua.GetVariable("DUNGEON_AVAILABLE").asBool); // this comes out true when isDungeonAvailable is true.
        
Then, I use it like this below to set condition for it. the other one is checking if the bool is true.
11.png
11.png (11.98 KiB) Viewed 180 times
but it always falls into "false" result.
In Variable tab, I set the variable like this:
화면 캡처 2021-01-22 230603.png
화면 캡처 2021-01-22 230603.png (100.06 KiB) Viewed 180 times
anything wrong?

Re: DialogueLug getting the value wrong in Dialogue Node

Posted: Sat Jan 23, 2021 9:24 am
by Tony Li
Hi,

As a test, in your conversation's Dialogue Text add this: [var=DUNGEON_AVAILABLE]

For example, set the first line of dialogue to:
  • Dialogue Text: "Hello. [var=DUNGEON_AVAILABLE]"
Does it show true or false?

Also, be aware that Conversation Evaluate Conditions One Extra Level Ahead.

You can also use the Variable Viewer window or the Dialogue Editor's Watches tab to see the current value of the variable.