Jump to content


Photo
- - - - -

Word Censor


  • Please log in to reply
11 replies to this topic

#1 Rixeno

Rixeno

    The One 'n' Only

  • New Member
  • 513 posts

Posted 05 January 2008 - 08:56 PM

* Word Censor
* Tutorial Description - An easy way of censoring a string by adding censor words and the replacement value. Very simple and effective.

* File Type - .gm6
* Game Maker version - GM 6 Unregistered

* Direct Link -
-_- To gm6 example (includes all scripts) : Box.net
:P To scripts : Box.net
* Filesize - 6.7kb

* Credit is not required since there isn't much, but appreciated. If you would like something to be added, please notify me.
  • 0
Do you need an example? You can PM me a request and I'll try my best.
Creations:
- Extra String Functions - Sprite Chroma Key - String at Position - Word Censor - Draw_Line_Width (Unreg GM6-) - Shadowed Text - Draw N-Gon - PIXEL PERFECT COLLISION ENGINE-

#2 JordanMaster22

JordanMaster22

    GMC Member

  • New Member
  • 496 posts

Posted 07 January 2008 - 01:29 AM

this has big problems

it reflects on saying brass, passport, class, assist and more
  • 0
Oh no! Is Hypercam and Camstudio too laggy and crappy to record your games? All you want is to get some HQ or HD footage of your Game Maker game, but you don't have a state of the ark computer. There's a solution! This engine records hours of HQ or HD footage of your game, saves it to a KB-sized file, and doesn't require a lot of memory! Also, you can customize the frame-rate while playing back a file, so Hypercam can record a low frame rate and output a high one!

HD PLAYBACK ENGINE

#3 Rixeno

Rixeno

    The One 'n' Only

  • New Member
  • 513 posts

Posted 07 January 2008 - 09:22 PM

Yeah, I'll try to work on that, I am currently trying to find a way to detect the word without blocking that. One way would be not to check for example "censor", but for " censor ", with the spaces. But then there are many ways around that system...
  • 0
Do you need an example? You can PM me a request and I'll try my best.
Creations:
- Extra String Functions - Sprite Chroma Key - String at Position - Word Censor - Draw_Line_Width (Unreg GM6-) - Shadowed Text - Draw N-Gon - PIXEL PERFECT COLLISION ENGINE-

#4 JordanMaster22

JordanMaster22

    GMC Member

  • New Member
  • 496 posts

Posted 09 January 2008 - 02:02 AM

yeah its gonna take a while
also dont waiste your time on ass ***** damn and hell because those can be used in non-profanity ways
  • 0
Oh no! Is Hypercam and Camstudio too laggy and crappy to record your games? All you want is to get some HQ or HD footage of your Game Maker game, but you don't have a state of the ark computer. There's a solution! This engine records hours of HQ or HD footage of your game, saves it to a KB-sized file, and doesn't require a lot of memory! Also, you can customize the frame-rate while playing back a file, so Hypercam can record a low frame rate and output a high one!

HD PLAYBACK ENGINE

#5 Rixeno

Rixeno

    The One 'n' Only

  • New Member
  • 513 posts

Posted 09 January 2008 - 09:11 PM

yeah its gonna take a while
also dont waiste your time on ass ***** damn and hell because those can be used in non-profanity ways

<{POST_SNAPBACK}>

Why would I? the example/script lets you add whatever you want and stores it in an array for further use. If you don't want those words, you just don't add them to the list, if you want them, you add them. So actually, the whole problem I had before can be easily changed by adding a word without the spaces. This example uses scripts to make it easier... -_-
  • 0
Do you need an example? You can PM me a request and I'll try my best.
Creations:
- Extra String Functions - Sprite Chroma Key - String at Position - Word Censor - Draw_Line_Width (Unreg GM6-) - Shadowed Text - Draw N-Gon - PIXEL PERFECT COLLISION ENGINE-

#6 TheMagicNumber

TheMagicNumber

    GMC Member

  • GMC Member
  • 5247 posts
  • Version:Unknown

Posted 09 January 2008 - 10:35 PM

This is the same problem all MMO games face. I mostly notice Runescape! Sometimes you can't say only one s like "s"
  • 0

#7 Rixeno

Rixeno

    The One 'n' Only

  • New Member
  • 513 posts

Posted 11 January 2008 - 12:36 AM

This is the same problem all MMO games face. I mostly notice Runescape! Sometimes you can't say only one s like "s"

<{POST_SNAPBACK}>

It's true, there isn't really a way to remove it. Because if you censor "hell", you can't say things like "shell", and if you censor " hell ", you can write "-hello-", etc. and it won't recognize it. It's very difficult though... I just wanted to make a simple engine to censor words... ;)
  • 0
Do you need an example? You can PM me a request and I'll try my best.
Creations:
- Extra String Functions - Sprite Chroma Key - String at Position - Word Censor - Draw_Line_Width (Unreg GM6-) - Shadowed Text - Draw N-Gon - PIXEL PERFECT COLLISION ENGINE-

#8 gmkaya

gmkaya

    GMC Member

  • New Member
  • 214 posts

Posted 15 January 2008 - 01:40 PM

keyboard_string="ass,****,jerk... you can add more if you like"
str=keyboard_string
string_censor_init()
string_censor_add("ass ","***")
string_censor_add("******","*******")
string_censor_add("jerk","****")
string_censor_add("crap","****")
str2=""

I put a space infront of the "ass" part inbetween the quotations which solves the whole assst problem, just incase this helps...
  • 0

#9 jon sploder

jon sploder

    GMC Member

  • GMC Member
  • 919 posts

Posted 17 January 2008 - 07:06 AM

Hmm, this is OK. Good work! Would this work on all text EVER typed in? Like if you added this to the official chat example? That might become annoying......
  • 0

#10 Rixeno

Rixeno

    The One 'n' Only

  • New Member
  • 513 posts

Posted 17 January 2008 - 08:06 PM

@jon sploder: If you want it to work on every text, then yes. What you basiclly have to do is initialize the system (string_censor_init), then you can add whatever words you want to remove (such as: string_censor_add("butt","@%$#")) and then you can censor any string by doing something such as...
string = string_censor(string)
...Which will just easily go through the string and replace every added word by it's replacement value. It's actually very simple once you understand...
  • 0
Do you need an example? You can PM me a request and I'll try my best.
Creations:
- Extra String Functions - Sprite Chroma Key - String at Position - Word Censor - Draw_Line_Width (Unreg GM6-) - Shadowed Text - Draw N-Gon - PIXEL PERFECT COLLISION ENGINE-

#11 Master_Computer

Master_Computer

    GMC Member

  • New Member
  • 499 posts

Posted 18 January 2008 - 06:28 PM

Here Is My Simple Edit:
- Use At Your Disposal...

SC_CenDo:
/*
- SC_CenDo("Censor_Initiate");
- SC_CenDo("Censor_Build",Sting);
- SC_CenDo("Censor_Add",Word,Replacement);
*/

switch (argument0)
{
  case "Censor_Initiate":
  { global.CEN_Add=0; }; break;
  
  case "Censor_Build":
  { var S_NEW,I;
  S_NEW=argument1;
  I=1;
  repeat (global.CEN_Add)
  {
    S_NEW=string_replace_all(S_NEW,string(CEN_WORD[I]),CEN_Replace[I]);
    I+=1;
  }
  return string(S_NEW); }; break;
  
  case "Censor_Add":
  { global.CEN_Add+=1;
  CEN_WORD[global.CEN_Add]=string(argument1);
  CEN_Replace[global.CEN_Add]=string(argument2); }; break;
}

EXAMPLE:

Create_Event:

S1=keyboard_string;

SC_CenDo("Censor_Initiate");
SC_CenDo("Censor_Add","Ass","***");
SC_CenDo("Censor_Add","****","****"); // F. Word
SC_CenDo("Censor_Add","****","****"); // S. Word
SC_CenDo("Censor_Add","*****","*****"); // B. Word
Step_Event:
S1=keyboard_string;
S1_CN=SC_CenDo("Censor_Build",S1);
Draw_Event:
draw_text(x,y,"Text Here: "+S1_CN);


  • 0
Try this link > Host-A Hosting. Its a free file hosting service. This link is specifically for referrals. Because I'll win free bandwidth if I refer someone.

#12 Nocturne

Nocturne

    Nocturne Games

  • Administrators
  • 25708 posts
  • Version:GM:Studio

Posted 03 August 2011 - 09:31 PM

Std Msg: Please use the tutorial template header
  • 0

U1FVsm3.png

40799.png