Posted 03 February 2013 - 10:26 AM
I'm doing a help program for a remote control turtle program that does about 35 things with lots of features using key presses Right now I'm writing a separate program for it that acts like a help function where a player can type in a button from the movement programs display to tell them what it does, or have them type in what they want it to do, and have it return how to do that with detail. Currently I have it set up as a local function set to each thing (that I have written this far) and have a ton of elseif s to match alternatives to what the player might ask, including capitalization differences. I thought of converting to lower case, but the key presses use capitals and lowercase, so that wouldn't work, and elseifs are easier to navigate than lots of or s in Notepad.
so here is my thought, is there a way that I can have it search your input for specific words? So If they wanted to go down, and stated it like "how do I make the turtle go down?" it would see the word "down" and refer to a local function that describes how to do that?
I am really hoping for something like this because using elseifs have made my code over 700 lines with only about 10% of the buttons covered.
so here is my thought, is there a way that I can have it search your input for specific words? So If they wanted to go down, and stated it like "how do I make the turtle go down?" it would see the word "down" and refer to a local function that describes how to do that?
I am really hoping for something like this because using elseifs have made my code over 700 lines with only about 10% of the buttons covered.