Hi,
Thanks for using the Dialogue System!
You're almost there.
For convenience, at the top of your sequencer command script, add:
Code: Select all
using PixelCrushers.DialogueSystem;
You can determine variable names by looking on the Dialogue Editor window's Variables tab. When converted from articy, they have the format
variablegroup.variablename. The Dialogue System uses Lua internally. Lua is a dynamically-typed language, which means a variable can store any data type (Number, Text, Boolean, etc.). When you get the variable value in a C# or UnityScript script, you should specify the type at the end of
DialogueLua.GetVariable(). For example:
Code: Select all
int score = DialogueLua.GetVariable("MyGlobals.Score").AsInt;
bool isAlive = DialogueLua.GetVariable("MyGlobals.Alive").AsBool;
float cost = DialogueLua.GetVariable("CurrencyVariables.DollarCost").AsFloat;
string secretPhrase = DialogueLua.GetVariable("Secrets.TheSecretPhrase").AsString;
To get the value of an actor field, use
DialogueLua.GetActorField():
Code: Select all
int age = DialogueLua.GetActorField("Player", "Age").AsInt;
If you have any other questions about this, just let me know!