Page 1 of 1

How to clear variables from script.

Posted: Tue Sep 07, 2021 9:36 am
by shirohige

Code: Select all

DialogueLua.GetVariable()
and

Code: Select all

DialogueLua.SetVariable()
work very well, how can I remove a variable in a similar way?

Best regards.

Re: How to clear variables from script.

Posted: Tue Sep 07, 2021 11:21 am
by Tony Li
Hi,

You can set it to null:

Code: Select all

DialogueLua.SetVariable("Your Variable", null);
To reset the entire database, use DialogueManager.ResetDatabase():

Code: Select all

DialogueManager.ResetDatabase();

Re: How to clear variables from script.

Posted: Wed Sep 08, 2021 8:37 am
by shirohige
Thx!

Re: How to clear variables from script.

Posted: Wed Sep 08, 2021 9:08 am
by Tony Li
Glad to help!