What's the best way to make a conditional that says, "if a day has passed since you visited this other node"?
Re: What's the best way to make a conditional that says, "if a day has passed since you visited this other node"?
That fixes my issue in this case, but is there any way to check that a primitive is uninitialized?
Re: What's the best way to make a conditional that says, "if a day has passed since you visited this other node"?
Hi,
You can check DialogueLua.DoesVariableExist():
You can check DialogueLua.DoesVariableExist():
Code: Select all
var variableName = "day" + entry.Title;
var entryDay = DialogueLua.DoesVariableExist(variableName) ? DialogueLua.GetVariable(variableName).asInt : Int32.MaxValue;
Re: What's the best way to make a conditional that says, "if a day has passed since you visited this other node"?
Cool, thanksTony Li wrote: ↑Wed Jul 10, 2019 7:59 am Hi,
You can check DialogueLua.DoesVariableExist():
Code: Select all
var variableName = "day" + entry.Title; var entryDay = DialogueLua.DoesVariableExist(variableName) ? DialogueLua.GetVariable(variableName).asInt : Int32.MaxValue;