This is going to sound kind of weird, but my dialogue system has the dialogue stored in text files which is then read through ajax and gets used in game. The dialogue currently supports branching paths, neat dialogue effects, etc.
This is what it looks like at the moment.
What if I want to check variables to see if dialogue is available? Let's say certain dialogue should only play if a quest is completed. This is easy to do from within Construct itself, but as all the dialogue is stored in these texts, I was hoping I could write the check within the file itself.
Within the dialogue file it would have something like testingvar=1 or testingvar=true. My testing file uses the example testvar=1 While the screenshot shows the check testvar=1 as part of the branch name, in my game it is properly separated after being read. However, after isolating this expression from the rest of the text from within Construct, it is still represented as a string. It isn't an expression that Construct can actually check.
Is there a way to convert a string to a readable expression? If so, how do I do it?
Any help is appreciated :)
(I apologize if this is hard to understand or read, it's kinda difficult to explain what I'm doing here.)