User Tag List

Results 1 to 5 of 5

Thread: Comparitive Profanity Filter Help

  1. #1
    Clicker Fusion 2.5 Developer
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)
    Lenchantin's Avatar
    Join Date
    May 2014
    Location
    Casper, WY
    Posts
    77
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unhappy Comparitive Profanity Filter Help

    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
    Code:
    Find(List Line Text$( "List", LoopIndex("swears") ), string$( "nameHoldover" ), 0)
    * 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)

    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?

    Thanks!

  2. #2
    Clicker Fusion 2.5 Developer
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)
    Lenchantin's Avatar
    Join Date
    May 2014
    Location
    Casper, WY
    Posts
    77
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here's the MFA file of how I have it set up. Caution, there are MANY bad words in the list, but that's what this whole thing is for. Also -- the screen size is 1920x1200, which is because it's being developed for a samsung tablet. I did remove all Android-specific plugins, and it's set as an EXE build type. Shouldn't have issues using it if you don't have the builder.

    The keyboard is a background image with zones over it for the keys. If you can't see the keys, let me know and I'll upload the image, but it should be stored in the object, I think.

    https://drive.google.com/file/d/0B1h...ew?usp=sharing

  3. #3
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    Wodjanoi's Avatar
    Join Date
    Jun 2015
    Location
    Germany
    Posts
    652
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    I had a quick look into your example.
    Currently the sound only plays(click button) when name input box is empty or when you type:
    z/o/p/h/i/l/a/zo/zoo/zoop/zooph/zoophi/zoophil/zoophili/zoophilia (last word in the list) / every letter combination in order after the z
    Maybe this helps to determine the issue.

    The overall goal is to simply block certain words for name input?

  4. #4
    Clicker Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleInstall Creator ProUnicode Add-on
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Jul 2006
    Posts
    574
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    I've taken a look. When it isn't found the value is set to -1. When you run a loop no other events are run until the loop ends which is why it isn't working. You have a few options the 2 that come to mind are:

    Add "On loop "swears"" to the Alterable Value A of Button >= 0

    or

    on the On loop "swears" event instead of setting Alterable value to the result add to value A the following: Max(0, Find(List Line Text$( "List", LoopIndex("swears") ), string$( "nameHoldover" ), 0)). Max will prevent -1 being added to the value A.

    Then you'll find that A will return greater than 0. you may want to limit the number of times this event runs.

  5. #5
    Clicker Fusion 2.5 Developer
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)
    Lenchantin's Avatar
    Join Date
    May 2014
    Location
    Casper, WY
    Posts
    77
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Danworth, I tried what you suggested (used the first suggestion, and added a stop loop if it pops a positive result), and it stops, however, it faces the same issue that Wodjanoi mentioned. I found that if I reverse the loop find code to read like this:

    Code:
    Find(string$( "nameHoldover" ), List Line Text$( "List", LoopIndex("swears") ), 0)
    It actually searches for the whole result in a word, rather than the other way around. I had the search backward.

    Thank you so much for your help!

Similar Threads

  1. Night filter
    By King_Cool in forum SWF/Flash Export Module Version 2.0
    Replies: 0
    Last Post: 25th May 2012, 01:35 PM
  2. Scale x2 filter?
    By Blazefirelp in forum Hardware Accelerated Runtime
    Replies: 15
    Last Post: 5th May 2011, 04:42 AM
  3. Graphics Filter, Audio Filter, and Transition SDK
    By kraminator in forum Extension Development
    Replies: 7
    Last Post: 27th March 2011, 08:40 PM
  4. Refelction Filter
    By The_Geohound in forum Hardware Accelerated Runtime
    Replies: 7
    Last Post: 27th March 2011, 01:37 AM
  5. Filter example for drnebula
    By strat59 in forum File Archive
    Replies: 0
    Last Post: 28th February 2007, 04:11 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •