I'm using Twine 2, Sugarcube.
I've set up a text input and have it so if the user inputs certain words, specific phrases will appear. However, this obviously only works if the user inputs those exact words, using the conditional operator "eq" like so: << if $input eq "word" >>
Is there an operator that is equivalent to "contains" or something similar? So that if the user inputed the sentence "I like cute kittens" I could make something happen just because the sentence contains the word "kittens" in it?
Thanks so much for your help!
-WR
Comments
You can use a combination of two function, Javascript's split and SugarCube's contains to do what you want.
Try the following: ... I formatted the above to make it more readable, you can safely remove the extra indents and line-breaks.