Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*================================= CREDITS =================================
- HyperFirez - Making the Script.
- HarryBo21 - Teaching me how to make the script.
- mentailty - Teaching me how to make the script as well.
- ================================= CREDITS =================================*/
- #include maps\_utility;
- #include common_scripts\utility;
- #include maps\_zombiemode_utility;
- //================================= RANDOMIZE GOBBLEGUMS=================================
- init( )
- {
- level.gumball = [ ]; //this creates an array, which is a container, that holds multiple objects - which at this point is empty
- add_gobblegum("kill_joy"); //this is calling the function we define below, which will add a object to that array
- level thread print_name(level.gumball[ 0 ]);
- }
- add_goobblegum(name, func)
- {
- struct = SpawnStruct();
- if( !IsDefined (level.gumball ) )
- {
- level.gumball = [ ];
- }
- struct.name = name;
- if( Isdefined (func) )
- struct.func = func;
- level.gumball[ level.gumball.size ] = struct;
- }
- print_name( array_object )
- {
- while( 1 )
- {
- iPrintIn( array_object.name ); //this will print a self.name from whatever object you passes in the arguement - arguemnt is what you put between the () when calling it.
- wait 1;
- }
- init_machine();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement