So, I have a very specific problem. I have a random word which I have already generated. I also have a separate string that uses the length of that character, 'n' to repeat "_ " n times to field wordDisplay
. These elements of the program work. So, if the random word was "meme", the wordDisplay
, on openCard
would show "_ _ _ _ ".
Now, I have an input button "a". If this button is clicked, it will check for "a" in the randomword
variable and if it is found, it will replace the "_ " in the wordDisplay
with "a". So, if the randomword
was "name", then before you click "a", the wordDisplay
shows "_ _ _ _ ". After you click "a", wordDisplay
will show "_ a _ _ ". However, if there is more than one "a", it will reveal all of them.
It is also worth knowing that I plan to have the program do something if there is no letter found.
Being a beginner to LiveCode, this all seems very confusing to me and I would really appreciate someone to share their knowledge on how I would do something like this. Thanks!