I think that's simply impossible .When someone will be able to do that in gml please tell me .
I just did it : D
/*
filter(text)
*/
var i,curChar,newText;
newText = "";
for(i=1;i<=string_length(argument0);i+=1)
{
curChar = string_char_at(argument0,i);
if curChar!=string_char_at(argument0,i-1)
{
newText+=curChar;
}
}
if string_lower(newText) = "ugly"
{
return("****");
}
return(argument0);
But as Dark Matter said, it's not good at all to do this since it will filter appropriate words as well, which is why there's no online game filters this way.
Back to your project, there is one tiny bug which is very easy to fix. It filters the word 'ugly' but does not filter the word 'Ugly'.
It's very easy to fix by converting the text into lower characters just before filtering (Which is what I did in the code above). Just use string_lower before filtering.
Good luck!
Edit: In case you don't know what to do, in the script filter_string replace line 6 with this:
i=1;newstr=string_lower(argument1);
Edited by loverock125, 13 January 2012 - 06:22 PM.