Page 1 of 1

Change Variable

Posted: Sun Sep 19, 2021 12:03 pm
by ludo2vie
Hello,

I have variables in my Dialogue Base.

Image

At the end of the dialog, I have the value of the variable "EndDialogue" which changes to 1.
I would like to change this value from a script.
I don't find the way to call variables in the dialog system.

Thx & excuse my english.

Re: Change Variable

Posted: Sun Sep 19, 2021 1:43 pm
by Tony Li
Hi,

Use DialogueLua.GetVariable() and SetVariable(). Example:

Code: Select all

using PixelCrushers.DialogueSystem; // (Put at top of script.)
...
DialogueLua.SetVariable("playerName", "ludo2vie");

Re: Change Variable

Posted: Sun Sep 19, 2021 2:05 pm
by ludo2vie
Thx !!!

Re: Change Variable

Posted: Sun Sep 19, 2021 2:06 pm
by Tony Li
You're welcome! :-)