DialogueLug getting the value wrong in Dialogue Node

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
fkkcloud
Posts: 298
Joined: Mon Oct 05, 2020 6:00 am

DialogueLug getting the value wrong in Dialogue Node

Post 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 181 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 181 times
anything wrong?
User avatar
Tony Li
Posts: 22049
Joined: Thu Jul 18, 2013 1:27 pm

Re: DialogueLug getting the value wrong in Dialogue Node

Post 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.
Post Reply