Set Variable in C#

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Simplehiro
Posts: 6
Joined: Sat Jan 14, 2023 11:53 am

Set Variable in C#

Post by Simplehiro »

Is there a way to change a variable trough a c# code?

i update a quest like this:

Code: Select all

 QuestLog.SetQuestState("Omi", QuestState.Success);
I have set some Booleans in the Dialogue System and would like to change them with code like i do it with my Quests.
User avatar
Tony Li
Posts: 21962
Joined: Thu Jul 18, 2013 1:27 pm

Re: Set Variable in C#

Post by Tony Li »

Hi,

Yes, use DialogueLua.SetVariable(). Example:

Code: Select all

DialogueLua.SetVariable("Talked To Mayor", true);
Post Reply