Change Variable

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
ludo2vie
Posts: 6
Joined: Mon Jul 05, 2021 6:54 am

Change Variable

Post 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.
User avatar
Tony Li
Posts: 22158
Joined: Thu Jul 18, 2013 1:27 pm

Re: Change Variable

Post 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");
ludo2vie
Posts: 6
Joined: Mon Jul 05, 2021 6:54 am

Re: Change Variable

Post by ludo2vie »

Thx !!!
User avatar
Tony Li
Posts: 22158
Joined: Thu Jul 18, 2013 1:27 pm

Re: Change Variable

Post by Tony Li »

You're welcome! :-)
Post Reply