I'm set Variable["EndFirstDialog"] = true in Dialogue Conversation Script field.
How to get this value in my c# script?
[Solved]How to get variable value?
[Solved]How to get variable value?
Last edited by Evgeny on Wed Mar 23, 2016 9:54 am, edited 1 time in total.
Re: How to get variable value?
Hi,
Code: Select all
using PixelCrushers.DialogueSystem;
...
bool myValue = DialogueLua.GetVariable("EndFirstDialog").AsBool;
Re: How to get variable value?
Thnx! Next question
How to receive in Lua value of a variable from C#?
How to receive in Lua value of a variable from C#?
Re: [Solved]How to get variable value?
Can you please tell me how to listen for a change in a variable?
Re: [Solved]How to get variable value?
You can use a Lua observer or manually check it using DialogueLua.GetVariable(). If you use a Lua observer, avoid using LuaWatchFrequency.EveryUpdate since this will run code every update. Instead, check it when it's important to check, such as at the end of conversations.