I am using this plugin to have a player imput text that the program then responds to. The player types in a keyword, then the game spits out text in response.
An example: Type in “Yume”, the game spits back a textbox that just says “Yume Nikk?”, like so:
Unfortunately, I am stupid. I’m trying to figure out how to make multiple keywords go to the same command. For example, I would want “Yume”, “Yume Nikki”, & “YN” to all go to the same description of Yume Nikki. How do I do that without copying and pasting it over and over like this?
Swap 21 for whichever variable your input plugin writes the typed text into. The trim and toLowerCase mean YN, yn and a stray space all behave the same, so you don’t need a branch per spelling. One branch now covers every alias, and adding a new alias is one more entry in the brackets.
If you’re going to have a lot of entries, a lookup table scales better than a pile of branches. Run this once in a Script command after the input:
Then branch once on variable 22 being 1, 2 and so on, with 0 as your “I do not know that word” case. Adding a synonym is one line and never a new branch.