Hello again! My sincerest apologies for making another post so soon after the last one.
I was browsing through the documentation and noticed that there was a feature for defining and checking the value of variables, I wanted to use this to similar effect of the <<!visited("passagename")>>, only by allowing it to gather data from a script and checking if an item or character was in an array.
I've been using the FleeceVisualNovelExample as a template for this so far and making my commands through the bool RunCommand()
However, when I tried to make something like <coin()> from the shop example, that would use commandInsertString to leave a "true" or "false" statement behind, thus allowing me to run a check for if player A had Item "the mcguffin", Then it would come up as true and the dialogue would progress as normal.
However when I did this, it turned out /ALL/ my results came back true. This is because I made it in a separate script, my own "VN" script, which is not the parser or default parser scripts and I'm not sure what I need to override so that I can make a function similar to those. Especially since the DefaultParser and Parser classes are inherited, so I can't just put one in the scene and give it a variable that lets it access my player stats script in the scene.
I'd like to know how to make something like <<Coin()>> or <<visited("nameOfPassage")>> in a separate script, like in the FleeceVisualNovelExample so that I can reference other public variables and not have to instantiate them at the beginning of dialogue. And then use these to allow or disallow players to see certain dialogue chains.
I'd appreciate any assistance in the matter, or to be pointed in the right direction on how to resolve this. Thanks.