Here's what we're doing: we have an interactive game where users enter their name. This will be in an educational setting, and you know how kids are -- we are required to have a profanity filter.
* We built a keyboard, so that there can be no spaces or special characters. They are limited to letters A-Z only.
* Keyboard has a 12 character limit. Each time they tap a key, the letter is added to a string object.
* When the button is clicked to enter the name, it's sent to another string field, and converted to lowercase. (Our list of swears is all in lower case.)
* We have a list object with ~400 swear words entered in.
* Start of frame, Alterable Value A of Button Object is set to -1
What we need it to do is to check the name, and see if someone has added a swear word anywhere in the text they entered. For instance, sirdamnit would flag just the same as damn, because the first one contains damn, which would be on the list. (Lame, but the tamest word I could use in the forum and not embarrass myself.)
Here's what I have that's not working:
* An event triggers a fast loop called "swears". It's set to loop the same number of times as the list has lines. In our case, roughly 400.
* On loop "swears" -- The alterable value A of an object is set to
* When Alterable Value A of the button object is >=0 -- play a sound. (It was just to see if it was catching it before I started adding in more stuff)
Find(List Line Text$( "List", LoopIndex("swears") ), string$( "nameHoldover" ), 0)
When I enter in "Lucie" -- it doesn't do anything, as expected. Alt. Val. A on button stays at -1, no sound.
When I enter in "Ass" (on the list) - it doesn't do anything either. Alt. Val A on button stays at -1, no sound. It should change the alt val to 0 and trigger the sound.
When I enter in a single letter, it sets the alt val A to something else entirely, like when I enter in "P", I get an alt val. A of 3, and it triggers the sound.
Can anyone help me with this?