Back to home

Overwatch Pictionary

FH93A
click to copy
This game is archived.
If you with to unarchive it, click the "restore" button in the options menu.

Category:
Custom game mode

Author:
PMAJellies

Rating:
0

Version:
1.0.0

Posted:
2 days ago

Tags:
pictionary gamemode

Share this workshop!

Options

settings
{
	main
	{
		Description: "Overwatch Pictionary by PMAJellies"
	}

	lobby
	{
		Allow Players Who Are In Queue: Yes
		Match Voice Chat: Enabled
	}

	modes
	{
		Deathmatch
		{
			enabled maps
			{
				Workshop Chamber
			}
		}

		General
		{
			Game Length In Minutes: 15
			Game Mode Start: Manual
			Hero Limit: Off
			Score To Win: 50
		}
	}

	heroes
	{
		General
		{
			Ultimate Ability: Off
		}
	}
}

variables
{
	global:
		0: PlayerArray
		1: StartPictionary
		2: Drawer
		3: Turn
		4: DrawerRadius
		5: DrawerColor
		6: Timer
		7: DrawTool
		8: ForLoop
		9: NumOfEffects
		10: AllWordsArray
		11: ChoosingWord
		12: PictionaryWord
		13: NumGuessed
		14: RoundNum
		15: Winner
		16: ScoreboardArray

	player:
		0: Points
		2: BulletEffect
		3: Firing
		4: WordArray
		6: GuessedWord
}

subroutines
{
	0: Menu
	1: Pictionary
	2: Keyboard
	3: Scoreboard
	4: NewDrawer
	5: Winner
}

disabled rule("Debug Hud [testing]")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	actions
	{
		Create HUD Text(Event Player, Facing Direction Of(Event Player), Null, Null, Left, 0, White, White, White, Visible To and String,
			Default Visibility);
		Create HUD Text(Event Player, Position Of(Event Player), Null, Null, Left, 0, White, White, White, Visible To and String,
			Default Visibility);
		Create HUD Text(Event Player, Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(
			Event Player) * 1000, Null, All Players(All Teams), False), Null, Null, Left, 0, Yellow, White, White, Visible To and String,
			Default Visibility);
	}
}

rule("Pictionary All Words Array 1")
{
	event
	{
		Ongoing - Global;
	}

	actions
	{
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("BANANA"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("PUMPKIN"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("APPLE"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("GRAPES"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("CARROT"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("FISH"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("HOTDOG"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("PIZZA"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("PINEAPPLE"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("CHICKEN"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("PIG"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("DOG"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("CAT"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("ELEPHANT"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("SNAKE"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("SHARK"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("BUTTERFLY"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("SPIDER"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("FLOWER"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("TREE"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("VOLCANO"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("TORNADO"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("OCEAN"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("SEAWEED"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("ISLAND"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("WATERFALL"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("EARTH"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("MOON"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("SUN"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("SATURN"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("HEADPHONES"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("PHONE"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("KEYBOARD"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("MOUSE"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("MICROPHONE"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("MONEY"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("HAT"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("DESK"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("BED"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("TOOTHBRUSH"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("TOILET"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("CHAIR"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("FIRE"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("WATER"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("LIGHTNING"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("NIKE"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("COKE"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("PEPSI"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("OVERWATCH"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("MINECRAFT"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("MCDONALDS"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("BURGER KING"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("TOYOTA"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("FACEBOOK"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("YOUTUBE"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("TWITTER"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("REDDIT"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("WINDOWS"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("FOOTBALL"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("BASEBALL"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("TENNIS"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("GOLF"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("BASKETBALL"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("SOCCER"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("FOOTBALL"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("HOCKEY"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("PLAYSTATION"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("NINTENDO"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("STEAM"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("DISCORD"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("XBOX"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("MARIO"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("SONIC"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("KIRBY"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("PIKACHU"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("PACMAN"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("LINK"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("TETRIS"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("PONG"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("BATMAN"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("SUPERMAN"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("SPIDERMAN"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("IRON MAN"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("CAPTAIN AMERICA"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("THOR"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("JEFF KAPLAN"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("TRUMP"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("OBAMA"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("KIT KAT"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("REESES"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("CANDY CORN"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("DOCTOR"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("POLICE"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("FARMER"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("BOXING"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("BOOK"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("RAINBOW"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("TRUCK"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("CAR"));
	}
}

rule("Pictionary All Words Array 2")
{
	event
	{
		Ongoing - Global;
	}

	actions
	{
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("BIKINI"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("BEARD"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("EYE"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("LADYBUG"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("NOSE"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("BEE"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("MAILBOX"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("STARFISH"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("CRAB"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("LOBSTER"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("ANGRY"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("SAD"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("HAPPY"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("DRAGON"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("LIPSTICK"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("FLAG"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("ROBOT"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("MAGNET"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("TELESCOPE"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("TENT"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("MUSIC"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("PIANO"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("BIRD"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("TACO"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("CLOCK"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("WATCH"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("PIRATE"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("BOAT"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("MOM"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("DAD"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("CAKE"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("PIE"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("CAMERA"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("TWITCH"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("PHOTOSHOP"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("SPOTIFY"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("INSTAGRAM"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("FIREFOX"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("CALCULATOR"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("ANDROID"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("POPCORN"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("DICE"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("PENCIL"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("SHAVE"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("BALLOON"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("DIAMOND"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("OCTOPUS"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("FLORIDA"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("CUPCAKE"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("SCISSORS"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("FORK"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("SPOON"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("KNIFE"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("SANDWICH"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("GLASSES"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("BUBBLEGUM"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("JELLYFISH"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("STRAWBERRY"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("LIGHTSABER"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("FLASHLIGHT"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("SPONGEBOB"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("SQUIDWARD"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("HOMER"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("MICKEY MOUSE"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("SHAGGY"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("DONALD DUCK"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("PATRICK"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("TOM AND JERRY"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("SAMURAI JACK"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("DEXTER"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("AVATAR"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("DUCKTALES"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("PHINEAS AND FERB"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("HEART"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("PICKLE RICK"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("JAWS"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("JURASSIC PARK"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("STAR WARS"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("ET"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("LION KING"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("TOY STORY"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("PINOCCHIO"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("GENIE"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("NEMO"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("UP"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("MONSTERS INC"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("DORY"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("GRENADE"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("YODA"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("ICE"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("SKITTLES"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("DEATH"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("LADDER"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("COFFIN"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("ELMO"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("HARRY POTTER"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("TEAR"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("BEACH"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("MUSTACHE"));
	}
}

rule("Pictionary All Words Array 3")
{
	event
	{
		Ongoing - Global;
	}

	actions
	{
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("ZENYATTA"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("ANA"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("LUCIO"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("ZARYA"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("REINHARDT"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("WRECKING BALL"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("MCCREE"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("ASHE"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("DOOMFIST"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("MOIRA"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("SOLDIER"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("DVA"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("ORISA"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("WIDOWMAKER"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("GENJI"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("HANZO"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("BASTION"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("TORBJORN"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("SIGMA"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("NOTHING"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("DRUGS"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("WEED"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("SHADOW"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("HAIR"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("WINSTON"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("JOYSTICK"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("BLENDER"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("SPRING"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("WINTER"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("SUMMER"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("WHEEL"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("PLANE"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("HELICOPTER"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("ZOMBIE"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("HORSE"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("SQUID"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("BOWSER"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("LEAF"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("JAZZ"));
		Modify Global Variable(AllWordsArray, Append To Array, Custom String("FOX"));
	}
}

rule("Global Variables")
{
	event
	{
		Ongoing - Global;
	}

	actions
	{
		Disable Built-In Game Mode Completion;
		Disable Built-In Game Mode Scoring;
		Global.PlayerArray = Empty Array;
		Global.StartPictionary = False;
		Global.Timer = -1;
		Global.RoundNum = 1;
	}
}

rule("Player Variables")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	actions
	{
		Event Player.Points = 0;
		Event Player.WordArray = Empty Array;
	}
}

rule("Menu")
{
	event
	{
		Subroutine;
		Menu;
	}

	actions
	{
		Create In-World Text(All Players(All Teams), Custom String("Overwatch   Pictionary"), Vector(19.500, 19, 0), 3, Do Not Clip,
			Visible To Position and String, Orange, Default Visibility);
		Create In-World Text(All Players(All Teams), Custom String("By PMAJellies"), Vector(19.500, 17, 0), 2, Do Not Clip,
			Visible To Position and String, White, Default Visibility);
		Create In-World Text(All Players(All Teams), Custom String("START"), Vector(19.500, 5, 0), 3, Do Not Clip,
			Visible To Position and String, White, Default Visibility);
		disabled Create Effect(All Players(All Teams), Sphere, White, Vector(20, 12.500, 0), 1, Visible To Position and Radius);
	}
}

rule("StartLobby")
{
	event
	{
		Ongoing - Global;
	}

	actions
	{
		Call Subroutine(Menu);
	}
}

rule("Loop Time")
{
	event
	{
		Ongoing - Global;
	}

	conditions
	{
		Match Time < 3500;
	}

	actions
	{
		Set Match Time(3599);
	}
}

rule("Player Joins")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		Is Alive(Event Player) == True;
		Has Spawned(Event Player) == True;
	}

	actions
	{
		Teleport(Event Player, Vector(-8, 0, Random Real(-8, 8)));
		Set Facing(Event Player, Vector(0.950, 0.300, 0), To World);
		Set Status(Event Player, Null, Phased Out, 9999);
		Set Primary Fire Enabled(Event Player, False);
		Global.PlayerArray = Append To Array(Global.PlayerArray, Event Player);
		Set Ability 1 Enabled(Event Player, False);
		Set Ability 2 Enabled(Event Player, False);
		Set Secondary Fire Enabled(Event Player, False);
	}
}

rule("Player Leaves")
{
	event
	{
		Player Left Match;
		All;
		All;
	}

	actions
	{
		Global.PlayerArray = Remove From Array(Global.PlayerArray, Event Player);
		If(Event Player.GuessedWord == True);
			Global.NumGuessed -= 1;
		End;
		If(Global.Drawer == Event Player);
			Global.Timer = 0;
	}
}

rule("Primary Fire")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		Is Button Held(Event Player, Primary Fire) == True;
		Global.Drawer != Event Player;
		Event Player.GuessedWord == False;
	}

	actions
	{
		Event Player.Firing = True;
		disabled Create Effect(Event Player, Sphere, Red, Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)
			  Facing Direction Of(Event Player) * 100, Null, Event Player, True), 0.200, None);
		disabled Event Player.BulletEffect = Last Created Entity;
		Play Effect(Event Player, Ring Explosion Sound, White, Event Player, 100);
		Wait(0.016, Ignore Condition);
		Event Player.Firing = False;
		Wait(0.100, Ignore Condition);
		disabled Destroy Effect(Event Player.BulletEffect);
	}
}

rule("Start Pictionary")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		Distance Between(Vector(20, 7.200, 0), Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)
			  Facing Direction Of(Event Player) * Distance Between(Eye Position(Event Player), Vector(20, 7.200, 0)), Null, All Players(
			All Teams), False)) <= 1;
		Event Player.Firing == True;
		Global.StartPictionary == False;
	}

	actions
	{
		Set Status(All Players(All Teams), Null, Rooted, 2);
		Destroy All In-World Text;
		Wait(0.016, Ignore Condition);
		Global.StartPictionary = True;
		disabled Call Subroutine(Pictionary);
		disabled Call Subroutine(Keyboard);
		disabled Call Subroutine(Scoreboard);
		Global.PlayerArray = Randomized Array(Global.PlayerArray);
		Global.Turn = -1;
		Call Subroutine(NewDrawer);
		Big Message(All Players(All Teams), Custom String("Round {0}", Global.RoundNum));
	}
}

rule("Setup Pictionary Players")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		Global.StartPictionary == True;
	}

	actions
	{
		Create In-World Text(Event Player, Event Player.WordArray, Eye Position(Event Player)   Facing Direction Of(Event Player), 1.500,
			Do Not Clip, Visible To Position and String, White, Default Visibility);
		Event Player.Points = 0;
	}
}

rule("PictionarySub")
{
	event
	{
		Subroutine;
		Pictionary;
	}

	actions
	{
		Create Beam Effect(All Players(All Teams), Good Beam, Vector(19.500, 8, -8), Vector(19.500, 8, 8), White,
			Visible To Position and Radius);
		Create Beam Effect(All Players(All Teams), Good Beam, Vector(19.500, 24, -8), Vector(19.500, 24, 8), White,
			Visible To Position and Radius);
		Create Beam Effect(All Players(All Teams), Good Beam, Vector(19.500, 24, 8), Vector(19.500, 8, 8), White,
			Visible To Position and Radius);
		Create Beam Effect(All Players(All Teams), Good Beam, Vector(19.500, 24, -8), Vector(19.500, 8, -8), White,
			Visible To Position and Radius);
		Create Effect(Global.Drawer, Sphere, White, Vector(20, 22, -10), 1, Visible To Position and Radius);
		Create Effect(Global.Drawer, Sphere, White, Vector(20, 19, -10), 0.800, Visible To Position and Radius);
		Create Effect(Global.Drawer, Sphere, White, Vector(20, 16, -10), 0.600, Visible To Position and Radius);
		Create Effect(Global.Drawer, Sphere, White, Vector(20, 13, -10), 0.400, Visible To Position and Radius);
		Create Effect(Global.Drawer, Sphere, White, Vector(20, 10, -10), 0.200, Visible To Position and Radius);
		Create Effect(Global.Drawer, Sphere, White, Vector(20, 20, 10), 0.800, Visible To Position and Radius);
		Create Effect(Global.Drawer, Sphere, Red, Vector(20, 18, 10), 0.800, Visible To Position and Radius);
		Create Effect(Global.Drawer, Sphere, Orange, Vector(20, 16, 10), 0.800, Visible To Position and Radius);
		Create Effect(Global.Drawer, Sphere, Yellow, Vector(20, 14, 10), 0.800, Visible To Position and Radius);
		Create Effect(Global.Drawer, Sphere, Lime Green, Vector(20, 12, 10), 0.800, Visible To Position and Radius);
		Create Effect(Global.Drawer, Sphere, Green, Vector(20, 18, 12), 0.800, Visible To Position and Radius);
		Create Effect(Global.Drawer, Sphere, Sky Blue, Vector(20, 16, 12), 0.800, Visible To Position and Radius);
		Create Effect(Global.Drawer, Sphere, Blue, Vector(20, 14, 12), 0.800, Visible To Position and Radius);
		Create Effect(Global.Drawer, Sphere, Purple, Vector(20, 12, 12), 0.800, Visible To Position and Radius);
		Create Beam Effect(All Players(All Teams), Good Beam, Vector(-4, 0, 20), Vector(-4, 0, -20), Red, Visible To Position and Radius);
		Create Icon(Global.Drawer, Vector(20, 7.500, 11), Trashcan, Visible To and Position, Red, False);
	}
}

rule("KeyboardSub")
{
	event
	{
		Subroutine;
		Keyboard;
	}

	actions
	{
		disabled Create In-World Text(All Players(All Teams), Custom String("Q  W  E  R  T  Y  U  I  O  P"), Vector(20, 4.500, 0), 2, Do Not Clip,
			Visible To Position and String, White, Default Visibility);
		Create In-World Text(All Players(All Teams), Custom String("Q"), Vector(20, 4.500, -9), 2, Do Not Clip,
			Visible To Position and String, White, Default Visibility);
		Create In-World Text(All Players(All Teams), Custom String("W"), Vector(20, 4.500, -7), 2, Do Not Clip,
			Visible To Position and String, White, Default Visibility);
		Create In-World Text(All Players(All Teams), Custom String("E"), Vector(20, 4.500, -5), 2, Do Not Clip,
			Visible To Position and String, White, Default Visibility);
		Create In-World Text(All Players(All Teams), Custom String("R"), Vector(20, 4.500, -3), 2, Do Not Clip,
			Visible To Position and String, White, Default Visibility);
		Create In-World Text(All Players(All Teams), Custom String("T"), Vector(20, 4.500, -1), 2, Do Not Clip,
			Visible To Position and String, White, Default Visibility);
		Create In-World Text(All Players(All Teams), Custom String("Y"), Vector(20, 4.500, 1), 2, Do Not Clip,
			Visible To Position and String, White, Default Visibility);
		Create In-World Text(All Players(All Teams), Custom String("U"), Vector(20, 4.500, 3), 2, Do Not Clip,
			Visible To Position and String, White, Default Visibility);
		Create In-World Text(All Players(All Teams), Custom String("I"), Vector(20, 4.500, 5), 2, Do Not Clip,
			Visible To Position and String, White, Default Visibility);
		Create In-World Text(All Players(All Teams), Custom String("O"), Vector(20, 4.500, 7), 2, Do Not Clip,
			Visible To Position and String, White, Default Visibility);
		Create In-World Text(All Players(All Teams), Custom String("P"), Vector(20, 4.500, 9), 2, Do Not Clip,
			Visible To Position and String, White, Default Visibility);
		Create In-World Text(All Players(All Teams), Custom String("DEL"), Vector(20, 4.500, 11), 2, Do Not Clip,
			Visible To Position and String, White, Default Visibility);
		Create In-World Text(All Players(All Teams), Custom String("A"), Vector(20, 2.500, -8), 2, Do Not Clip,
			Visible To Position and String, White, Default Visibility);
		Create In-World Text(All Players(All Teams), Custom String("S"), Vector(20, 2.500, -6), 2, Do Not Clip,
			Visible To Position and String, White, Default Visibility);
		Create In-World Text(All Players(All Teams), Custom String("D"), Vector(20, 2.500, -4), 2, Do Not Clip,
			Visible To Position and String, White, Default Visibility);
		Create In-World Text(All Players(All Teams), Custom String("F"), Vector(20, 2.500, -2), 2, Do Not Clip,
			Visible To Position and String, White, Default Visibility);
		Create In-World Text(All Players(All Teams), Custom String("G"), Vector(20, 2.500, 0), 2, Do Not Clip,
			Visible To Position and String, White, Default Visibility);
		Create In-World Text(All Players(All Teams), Custom String("H"), Vector(20, 2.500, 2), 2, Do Not Clip,
			Visible To Position and String, White, Default Visibility);
		Create In-World Text(All Players(All Teams), Custom String("J"), Vector(20, 2.500, 4), 2, Do Not Clip,
			Visible To Position and String, White, Default Visibility);
		Create In-World Text(All Players(All Teams), Custom String("K"), Vector(20, 2.500, 6), 2, Do Not Clip,
			Visible To Position and String, White, Default Visibility);
		Create In-World Text(All Players(All Teams), Custom String("L"), Vector(20, 2.500, 8), 2, Do Not Clip,
			Visible To Position and String, White, Default Visibility);
		Create In-World Text(All Players(All Teams), Custom String("Z"), Vector(20, 0.500, -6), 2, Do Not Clip,
			Visible To Position and String, White, Default Visibility);
		Create In-World Text(All Players(All Teams), Custom String("X"), Vector(20, 0.500, -4), 2, Do Not Clip,
			Visible To Position and String, White, Default Visibility);
		Create In-World Text(All Players(All Teams), Custom String("C"), Vector(20, 0.500, -2), 2, Do Not Clip,
			Visible To Position and String, White, Default Visibility);
		Create In-World Text(All Players(All Teams), Custom String("V"), Vector(20, 0.500, 0), 2, Do Not Clip,
			Visible To Position and String, White, Default Visibility);
		Create In-World Text(All Players(All Teams), Custom String("B"), Vector(20, 0.500, 2), 2, Do Not Clip,
			Visible To Position and String, White, Default Visibility);
		Create In-World Text(All Players(All Teams), Custom String("N"), Vector(20, 0.500, 4), 2, Do Not Clip,
			Visible To Position and String, White, Default Visibility);
		Create In-World Text(All Players(All Teams), Custom String("M"), Vector(20, 0.500, 6), 2, Do Not Clip,
			Visible To Position and String, White, Default Visibility);
		Create In-World Text(All Players(All Teams), Custom String("SUBMIT"), Vector(20, 0.500, 10), 2, Do Not Clip,
			Visible To Position and String, White, Default Visibility);
		Create In-World Text(All Players(All Teams), Custom String("| SPACE |"), Vector(20, -1.500, 0), 2, Do Not Clip,
			Visible To Position and String, White, Default Visibility);
	}
}

rule("ScoreboardSub")
{
	event
	{
		Subroutine;
		Scoreboard;
	}

	actions
	{
		Global.ScoreboardArray = Sorted Array(Global.PlayerArray, Current Array Element.Points);
		Create HUD Text(All Players(All Teams), Null, Null, Custom String("{0}: Points {1}", Global.ScoreboardArray[0],
			Global.ScoreboardArray[0].Points), Left, 0, White, White, White, Visible To and String, Default Visibility);
		Create HUD Text(All Players(All Teams), Null, Null, Custom String("{0}: Points {1}", Global.ScoreboardArray[1],
			Global.ScoreboardArray[1].Points), Left, 1, White, White, White, Visible To and String, Default Visibility);
		Create HUD Text(All Players(All Teams), Null, Null, Custom String("{0}: Points {1}", Global.ScoreboardArray[2],
			Global.ScoreboardArray[2].Points), Left, 2, White, White, White, Visible To and String, Default Visibility);
		Create HUD Text(All Players(All Teams), Null, Null, Custom String("{0}: Points {1}", Global.ScoreboardArray[3],
			Global.ScoreboardArray[3].Points), Left, 3, White, White, White, Visible To and String, Default Visibility);
		Create HUD Text(All Players(All Teams), Null, Null, Custom String("{0}: Points {1}", Global.ScoreboardArray[4],
			Global.ScoreboardArray[4].Points), Left, 4, White, White, White, Visible To and String, Default Visibility);
		Create HUD Text(All Players(All Teams), Null, Null, Custom String("{0}: Points {1}", Global.ScoreboardArray[5],
			Global.ScoreboardArray[5].Points), Left, 5, White, White, White, Visible To and String, Default Visibility);
		Create HUD Text(All Players(All Teams), Null, Null, Custom String("{0}: Points {1}", Global.ScoreboardArray[6],
			Global.ScoreboardArray[6].Points), Left, 6, White, White, White, Visible To and String, Default Visibility);
		Create HUD Text(All Players(All Teams), Null, Null, Custom String("{0}: Points {1}", Global.ScoreboardArray[7],
			Global.ScoreboardArray[7].Points), Left, 7, White, White, White, Visible To and String, Default Visibility);
		Create HUD Text(All Players(All Teams), Null, Null, Custom String("{0}: Points {1}", Global.ScoreboardArray[8],
			Global.ScoreboardArray[8].Points), Left, 8, White, White, White, Visible To and String, Default Visibility);
		Create HUD Text(All Players(All Teams), Null, Null, Custom String("{0}: Points {1}", Global.ScoreboardArray[9],
			Global.ScoreboardArray[9].Points), Left, 9, White, White, White, Visible To and String, Default Visibility);
		Create HUD Text(All Players(All Teams), Null, Null, Custom String("{0}: Points {1}", Global.ScoreboardArray[10],
			Global.ScoreboardArray[10].Points), Left, 10, White, White, White, Visible To and String, Default Visibility);
		Create HUD Text(All Players(All Teams), Null, Null, Custom String("{0}: Points {1}", Global.ScoreboardArray[11],
			Global.ScoreboardArray[11].Points), Left, 11, White, White, White, Visible To and String, Default Visibility);
	}
}

rule("NewDrawer Setup")
{
	event
	{
		Subroutine;
		NewDrawer;
	}

	actions
	{
		Start Forcing Throttle(All Players(All Teams), 0, 0, 0, 0, 0, 0);
		Global.NumGuessed = 0;
		All Players(All Teams).GuessedWord = False;
		Global.ChoosingWord = False;
		disabled Clear Status(All Players(All Teams), Rooted);
		Destroy All Effects;
		Destroy All In-World Text;
		Destroy All HUD Text;
		If(Global.Turn >= Count Of(Global.PlayerArray) - 1);
			Global.Turn = 0;
			Global.RoundNum  = 1;
			If(Global.RoundNum == 5);
				Big Message(All Players(All Teams), Custom String("Final Round", Global.RoundNum));
			Else;
				Big Message(All Players(All Teams), Custom String("Round {0}", Global.RoundNum));
			End;
		Else;
			Global.Turn  = 1;
		End;
		Global.Drawer = Global.PlayerArray[Global.Turn];
		Global.ChoosingWord = False;
		Teleport(Global.Drawer, Vector(2, 0, 0));
		Set Status(Global.Drawer, Null, Rooted, 9999);
		Set Gravity(Global.Drawer, 0);
		Wait(0.700, Ignore Condition);
		Set Status(Global.Drawer, Null, Phased Out, 9999);
		Set Facing(Global.Drawer, Vector(1, 0.070, 0), To World);
		Teleport(Global.Drawer, Vector(2, 12, 0));
		Call Subroutine(Scoreboard);
		Call Subroutine(Keyboard);
		Call Subroutine(Pictionary);
		Global.Timer = 60;
		Create HUD Text(All Players(All Teams), Null, Null, Custom String("Drawing: {0}", Global.Drawer), Top, 0, White, White, White,
			Visible To and String, Default Visibility);
		Create HUD Text(All Players(All Teams), Null, Null, Custom String("Time: {0}", Global.Timer), Top, 0, White, White, White,
			Visible To and String, Default Visibility);
		disabled Chase Global Variable At Rate(Timer, 0, 1, Destination and Rate);
		Global.DrawerColor = Custom String("White");
		Global.DrawerRadius = 0.600;
		Global.NumOfEffects = 0;
		Create HUD Text(All Players(All Teams), Null, Null, Custom String("Effect Limit: {0} / 100", Global.NumOfEffects), Top, 0, White,
			White, White, Visible To and String, Default Visibility);
		Global.AllWordsArray = Randomized Array(Global.AllWordsArray);
		Create In-World Text(Global.Drawer, Global.AllWordsArray[0], Vector(20, 18, 0), 2, Do Not Clip, Visible To Position and String,
			White, Visible Never);
		Create In-World Text(Global.Drawer, Global.AllWordsArray[1], Vector(20, 15, 0), 2, Do Not Clip, Visible To Position and String,
			White, Visible Never);
		Create In-World Text(Global.Drawer, Global.AllWordsArray[2], Vector(20, 12, 0), 2, Do Not Clip, Visible To Position and String,
			White, Visible Never);
		Clear Status(All Players(All Teams), Rooted);
		Wait(0.100, Ignore Condition);
		Set Status(Global.Drawer, Null, Rooted, 9999);
		Stop Forcing Throttle(All Players(All Teams));
		Event Player.WordArray = Custom String("");
	}
}

rule("QWERTYUIOP")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		Global.StartPictionary == True;
		Global.Drawer != Event Player;
		X Component Of(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(Event Player)
			* 1000, Null, Event Player, True)) == 20;
		Y Component Of(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(Event Player)
			* 1000, Null, Event Player, True)) > 5.500;
		Y Component Of(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(Event Player)
			* 1000, Null, Event Player, True)) < 7.500;
		Z Component Of(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(Event Player)
			* 1000, Null, Event Player, True)) > -10;
		Z Component Of(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(Event Player)
			* 1000, Null, Event Player, True)) < 10;
		Event Player.Firing == True;
	}

	actions
	{
		If(Z Component Of(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(Event Player)
			* 1000, Null, Event Player, True)) < -8);
			Event Player.WordArray = Custom String("{0}Q", Event Player.WordArray);
		Else If(Z Component Of(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(
				Event Player) * 1000, Null, Event Player, True)) < -6);
			Event Player.WordArray = Custom String("{0}W", Event Player.WordArray);
		Else If(Z Component Of(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(
				Event Player) * 1000, Null, Event Player, True)) < -4);
			Event Player.WordArray = Custom String("{0}E", Event Player.WordArray);
		Else If(Z Component Of(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(
				Event Player) * 1000, Null, Event Player, True)) < -2);
			Event Player.WordArray = Custom String("{0}R", Event Player.WordArray);
		Else If(Z Component Of(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(
				Event Player) * 1000, Null, Event Player, True)) < 0);
			Event Player.WordArray = Custom String("{0}T", Event Player.WordArray);
		Else If(Z Component Of(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(
				Event Player) * 1000, Null, Event Player, True)) < 2);
			Event Player.WordArray = Custom String("{0}Y", Event Player.WordArray);
		Else If(Z Component Of(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(
				Event Player) * 1000, Null, Event Player, True)) < 4);
			Event Player.WordArray = Custom String("{0}U", Event Player.WordArray);
		Else If(Z Component Of(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(
				Event Player) * 1000, Null, Event Player, True)) < 6);
			Event Player.WordArray = Custom String("{0}I", Event Player.WordArray);
		Else If(Z Component Of(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(
				Event Player) * 1000, Null, Event Player, True)) < 8);
			Event Player.WordArray = Custom String("{0}O", Event Player.WordArray);
		Else;
			Event Player.WordArray = Custom String("{0}P", Event Player.WordArray);
	}
}

rule("ASDFGHJKL")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		Global.StartPictionary == True;
		Global.Drawer != Event Player;
		X Component Of(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(Event Player)
			* 1000, Null, Event Player, True)) == 20;
		Y Component Of(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(Event Player)
			* 1000, Null, Event Player, True)) > 3.500;
		Y Component Of(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(Event Player)
			* 1000, Null, Event Player, True)) < 5.500;
		Z Component Of(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(Event Player)
			* 1000, Null, Event Player, True)) > -9;
		Z Component Of(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(Event Player)
			* 1000, Null, Event Player, True)) < 9;
		Event Player.Firing == True;
	}

	actions
	{
		If(Z Component Of(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(Event Player)
			* 1000, Null, Event Player, True)) < -7);
			Event Player.WordArray = Custom String("{0}A", Event Player.WordArray);
		Else If(Z Component Of(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(
				Event Player) * 1000, Null, Event Player, True)) < -5);
			Event Player.WordArray = Custom String("{0}S", Event Player.WordArray);
		Else If(Z Component Of(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(
				Event Player) * 1000, Null, Event Player, True)) < -3);
			Event Player.WordArray = Custom String("{0}D", Event Player.WordArray);
		Else If(Z Component Of(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(
				Event Player) * 1000, Null, Event Player, True)) < -1);
			Event Player.WordArray = Custom String("{0}F", Event Player.WordArray);
		Else If(Z Component Of(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(
				Event Player) * 1000, Null, Event Player, True)) < 1);
			Event Player.WordArray = Custom String("{0}G", Event Player.WordArray);
		Else If(Z Component Of(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(
				Event Player) * 1000, Null, Event Player, True)) < 3);
			Event Player.WordArray = Custom String("{0}H", Event Player.WordArray);
		Else If(Z Component Of(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(
				Event Player) * 1000, Null, Event Player, True)) < 5);
			Event Player.WordArray = Custom String("{0}J", Event Player.WordArray);
		Else If(Z Component Of(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(
				Event Player) * 1000, Null, Event Player, True)) < 7);
			Event Player.WordArray = Custom String("{0}K", Event Player.WordArray);
		Else;
			Event Player.WordArray = Custom String("{0}L", Event Player.WordArray);
	}
}

rule("ZXCVBNM")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		Global.StartPictionary == True;
		Global.Drawer != Event Player;
		X Component Of(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(Event Player)
			* 1000, Null, Event Player, True)) == 20;
		Y Component Of(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(Event Player)
			* 1000, Null, Event Player, True)) > 1.500;
		Y Component Of(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(Event Player)
			* 1000, Null, Event Player, True)) < 3.500;
		Z Component Of(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(Event Player)
			* 1000, Null, Event Player, True)) > -7;
		Z Component Of(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(Event Player)
			* 1000, Null, Event Player, True)) < 7;
		Event Player.Firing == True;
	}

	actions
	{
		If(Z Component Of(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(Event Player)
			* 1000, Null, Event Player, True)) < -5);
			Event Player.WordArray = Custom String("{0}Z", Event Player.WordArray);
		Else If(Z Component Of(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(
				Event Player) * 1000, Null, Event Player, True)) < -3);
			Event Player.WordArray = Custom String("{0}X", Event Player.WordArray);
		Else If(Z Component Of(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(
				Event Player) * 1000, Null, Event Player, True)) < -1);
			Event Player.WordArray = Custom String("{0}C", Event Player.WordArray);
		Else If(Z Component Of(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(
				Event Player) * 1000, Null, Event Player, True)) < 1);
			Event Player.WordArray = Custom String("{0}V", Event Player.WordArray);
		Else If(Z Component Of(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(
				Event Player) * 1000, Null, Event Player, True)) < 3);
			Event Player.WordArray = Custom String("{0}B", Event Player.WordArray);
		Else If(Z Component Of(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(
				Event Player) * 1000, Null, Event Player, True)) < 5);
			Event Player.WordArray = Custom String("{0}N", Event Player.WordArray);
		Else;
			Event Player.WordArray = Custom String("{0}M", Event Player.WordArray);
	}
}

rule("SPACE")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		Distance Between(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(Event Player)
			* 1000, Null, Event Player, True), Vector(20, 0.500, 0)) <= 1;
		Global.StartPictionary == True;
		Global.Drawer != Event Player;
		Event Player.Firing == True;
	}

	actions
	{
		Event Player.WordArray = Custom String("{0} ", Event Player.WordArray);
	}
}

rule("SUBMIT")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		Distance Between(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(Event Player)
			* 1000, Null, Event Player, True), Vector(20, 2.500, 10)) <= 1;
		Global.StartPictionary == True;
		Global.Drawer != Event Player;
		Event Player.Firing == True;
		Event Player.WordArray != Custom String("");
		Event Player.WordArray != Custom String("******");
	}

	actions
	{
		If(Event Player.WordArray == Global.PictionaryWord);
			Create HUD Text(All Players(All Teams), Null, Null, Custom String("{0} guessed correctly!", Event Player, Event Player.WordArray),
				Right, 0, White, White, Green, None, Default Visibility);
			Wait(0.020, Ignore Condition);
			Event Player.GuessedWord = True;
			Event Player.WordArray = Custom String("");
			Global.NumGuessed  = 1;
			Event Player.Points  = 100 / Global.NumGuessed;
			Global.Drawer.Points  = 20;
		Else;
			Create HUD Text(All Players(All Teams), Null, Null, Custom String("{0}: {1}", Event Player, Event Player.WordArray), Right, 0,
				White, White, White, None, Default Visibility);
			Wait(0.020, Ignore Condition);
			Event Player.WordArray = Custom String("");
	}
}

rule("DEL")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		Distance Between(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(Event Player)
			* 1000, Null, Event Player, True), Vector(20, 6.500, 11)) <= 1;
		Global.StartPictionary == True;
		Global.Drawer != Event Player;
		Event Player.Firing == True;
	}

	actions
	{
		Event Player.WordArray = Custom String("");
	}
}

rule("DrawTool")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		Global.Drawer == Event Player;
		Global.StartPictionary == True;
		X Component Of(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(Event Player)
			* 1000, Null, Event Player, True)) == 20;
		Y Component Of(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(Event Player)
			* 1000, Null, Event Player, True)) > 8;
		Y Component Of(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(Event Player)
			* 1000, Null, Event Player, True)) < 24;
		Z Component Of(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(Event Player)
			* 1000, Null, Event Player, True)) > -8;
		Z Component Of(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(Event Player)
			* 1000, Null, Event Player, True)) < 8;
		Global.ChoosingWord == True;
	}

	actions
	{
		If(Global.DrawerColor == Custom String("White"));
			Create Effect(Event Player, Sphere, White, Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)
				  Facing Direction Of(Event Player) * 1000, All Players(All Teams), Event Player, True), Global.DrawerRadius,
				Visible To Position and Radius);
		Else If(Global.DrawerColor == Custom String("Red"));
			Create Effect(Event Player, Sphere, Red, Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)
				  Facing Direction Of(Event Player) * 1000, All Players(All Teams), Event Player, True), Global.DrawerRadius,
				Visible To Position and Radius);
		Else If(Global.DrawerColor == Custom String("Orange"));
			Create Effect(Event Player, Sphere, Orange, Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)
				  Facing Direction Of(Event Player) * 1000, All Players(All Teams), Event Player, True), Global.DrawerRadius,
				Visible To Position and Radius);
		Else If(Global.DrawerColor == Custom String("Yellow"));
			Create Effect(Event Player, Sphere, Yellow, Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)
				  Facing Direction Of(Event Player) * 1000, All Players(All Teams), Event Player, True), Global.DrawerRadius,
				Visible To Position and Radius);
		Else If(Global.DrawerColor == Custom String("Lime"));
			Create Effect(Event Player, Sphere, Lime Green, Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)
				  Facing Direction Of(Event Player) * 1000, All Players(All Teams), Event Player, True), Global.DrawerRadius,
				Visible To Position and Radius);
		Else If(Global.DrawerColor == Custom String("Green"));
			Create Effect(Event Player, Sphere, Green, Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)
				  Facing Direction Of(Event Player) * 1000, All Players(All Teams), Event Player, True), Global.DrawerRadius,
				Visible To Position and Radius);
		Else If(Global.DrawerColor == Custom String("Sky"));
			Create Effect(Event Player, Sphere, Sky Blue, Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)
				  Facing Direction Of(Event Player) * 1000, All Players(All Teams), Event Player, True), Global.DrawerRadius,
				Visible To Position and Radius);
		Else If(Global.DrawerColor == Custom String("Blue"));
			Create Effect(Event Player, Sphere, Blue, Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)
				  Facing Direction Of(Event Player) * 1000, All Players(All Teams), Event Player, True), Global.DrawerRadius,
				Visible To Position and Radius);
		Else If(Global.DrawerColor == Custom String("Purple"));
			Create Effect(Event Player, Sphere, Purple, Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)
				  Facing Direction Of(Event Player) * 1000, All Players(All Teams), Event Player, True), Global.DrawerRadius,
				Visible To Position and Radius);
		End;
		Global.DrawTool = Last Created Entity;
	}
}

rule("DrawTool Destroy")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		Global.Drawer == Event Player;
		Global.StartPictionary == True;
		(Y Component Of(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(Event Player)
			* 1000, Null, Event Player, True)) > 24 || Y Component Of(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(
			Event Player)   Facing Direction Of(Event Player) * 1000, Null, Event Player, True)) < 8 || Z Component Of(
			Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(Event Player) * 1000, Null,
			Event Player, True)) < -8 || Z Component Of(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)
			  Facing Direction Of(Event Player) * 1000, Null, Event Player, True)) > 8) == True;
		Global.ChoosingWord == True;
	}

	actions
	{
		Destroy Effect(Global.DrawTool);
	}
}

rule("Drawer Draw")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		Global.Drawer == Event Player;
		Global.StartPictionary == True;
		X Component Of(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(Event Player)
			* 1000, Null, Event Player, True)) == 20;
		Y Component Of(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(Event Player)
			* 1000, Null, Event Player, True)) > 8;
		Y Component Of(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(Event Player)
			* 1000, Null, Event Player, True)) < 24;
		Z Component Of(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(Event Player)
			* 1000, Null, Event Player, True)) > -8;
		Z Component Of(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(Event Player)
			* 1000, Null, Event Player, True)) < 8;
		Is Button Held(Event Player, Primary Fire) == True;
		Global.ChoosingWord == True;
	}

	actions
	{
		If(Global.DrawerColor == Custom String("White"));
			Create Effect(All Players(All Teams), Sphere, White, Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)
				  Facing Direction Of(Event Player) * 1000, Null, Event Player, True), Global.DrawerRadius, None);
		Else If(Global.DrawerColor == Custom String("Red"));
			Create Effect(All Players(All Teams), Sphere, Red, Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)
				  Facing Direction Of(Event Player) * 1000, Null, Event Player, True), Global.DrawerRadius, None);
		Else If(Global.DrawerColor == Custom String("Orange"));
			Create Effect(All Players(All Teams), Sphere, Orange, Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)
				  Facing Direction Of(Event Player) * 1000, Null, Event Player, True), Global.DrawerRadius, None);
		Else If(Global.DrawerColor == Custom String("Yellow"));
			Create Effect(All Players(All Teams), Sphere, Yellow, Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)
				  Facing Direction Of(Event Player) * 1000, Null, Event Player, True), Global.DrawerRadius, None);
		Else If(Global.DrawerColor == Custom String("Lime"));
			Create Effect(All Players(All Teams), Sphere, Lime Green, Ray Cast Hit Position(Eye Position(Event Player), Eye Position(
				Event Player)   Facing Direction Of(Event Player) * 1000, Null, Event Player, True), Global.DrawerRadius, None);
		Else If(Global.DrawerColor == Custom String("Green"));
			Create Effect(All Players(All Teams), Sphere, Green, Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)
				  Facing Direction Of(Event Player) * 1000, Null, Event Player, True), Global.DrawerRadius, None);
		Else If(Global.DrawerColor == Custom String("Sky"));
			Create Effect(All Players(All Teams), Sphere, Sky Blue, Ray Cast Hit Position(Eye Position(Event Player), Eye Position(
				Event Player)   Facing Direction Of(Event Player) * 1000, Null, Event Player, True), Global.DrawerRadius, None);
		Else If(Global.DrawerColor == Custom String("Blue"));
			Create Effect(All Players(All Teams), Sphere, Blue, Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)
				  Facing Direction Of(Event Player) * 1000, Null, Event Player, True), Global.DrawerRadius, None);
		Else If(Global.DrawerColor == Custom String("Purple"));
			Create Effect(All Players(All Teams), Sphere, Purple, Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)
				  Facing Direction Of(Event Player) * 1000, Null, Event Player, True), Global.DrawerRadius, None);
		End;
		Global.NumOfEffects  = 1;
		Wait(0.100, Ignore Condition);
		If(Global.NumOfEffects >= 100);
			Small Message(Global.Drawer, Custom String("Effect Limit Reached"));
		End;
		Loop If Condition Is True;
	}
}

rule("Drawer Select Size")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		Global.StartPictionary == True;
		Global.Drawer == Event Player;
		X Component Of(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(Event Player)
			* 1000, Null, Event Player, True)) == 20;
		Y Component Of(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(Event Player)
			* 1000, Null, Event Player, True)) > 8;
		Y Component Of(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(Event Player)
			* 1000, Null, Event Player, True)) < 24;
		Z Component Of(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(Event Player)
			* 1000, Null, Event Player, True)) > -12;
		Z Component Of(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(Event Player)
			* 1000, Null, Event Player, True)) < -8;
		Is Button Held(Event Player, Primary Fire) == True;
		Global.ChoosingWord == True;
	}

	actions
	{
		If(Y Component Of(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(Event Player)
			* 1000, Null, Event Player, True)) < 11.500);
			Global.DrawerRadius = 0.200;
		Else If(Y Component Of(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(
				Event Player) * 1000, Null, Event Player, True)) < 14.500);
			Global.DrawerRadius = 0.400;
		Else If(Y Component Of(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(
				Event Player) * 1000, Null, Event Player, True)) < 17.500);
			Global.DrawerRadius = 0.600;
		Else If(Y Component Of(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(
				Event Player) * 1000, Null, Event Player, True)) < 20.500);
			Global.DrawerRadius = 0.800;
		Else;
			Global.DrawerRadius = 1;
	}
}

rule("Drawer Select Color 1")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		Global.StartPictionary == True;
		Global.Drawer == Event Player;
		X Component Of(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(Event Player)
			* 1000, Null, Event Player, True)) == 20;
		Y Component Of(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(Event Player)
			* 1000, Null, Event Player, True)) > 11;
		Y Component Of(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(Event Player)
			* 1000, Null, Event Player, True)) < 24;
		Z Component Of(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(Event Player)
			* 1000, Null, Event Player, True)) > 9;
		Z Component Of(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(Event Player)
			* 1000, Null, Event Player, True)) < 11;
		Is Button Held(Event Player, Primary Fire) == True;
		Global.ChoosingWord == True;
	}

	actions
	{
		If(Y Component Of(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(Event Player)
			* 1000, Null, Event Player, True)) < 13);
			Global.DrawerColor = Custom String("Lime");
		Else If(Y Component Of(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(
				Event Player) * 1000, Null, Event Player, True)) < 15);
			Global.DrawerColor = Custom String("Yellow");
		Else If(Y Component Of(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(
				Event Player) * 1000, Null, Event Player, True)) < 17);
			Global.DrawerColor = Custom String("Orange");
		Else If(Y Component Of(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(
				Event Player) * 1000, Null, Event Player, True)) < 19);
			Global.DrawerColor = Custom String("Red");
		Else;
			Global.DrawerColor = Custom String("White");
	}
}

rule("Drawer Select Color 2")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		Global.StartPictionary == True;
		Global.Drawer == Event Player;
		X Component Of(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(Event Player)
			* 1000, Null, Event Player, True)) == 20;
		Y Component Of(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(Event Player)
			* 1000, Null, Event Player, True)) > 11;
		Y Component Of(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(Event Player)
			* 1000, Null, Event Player, True)) < 22;
		Z Component Of(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(Event Player)
			* 1000, Null, Event Player, True)) > 11;
		Z Component Of(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(Event Player)
			* 1000, Null, Event Player, True)) < 13;
		Is Button Held(Event Player, Primary Fire) == True;
		Global.ChoosingWord == True;
	}

	actions
	{
		If(Y Component Of(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(Event Player)
			* 1000, Null, Event Player, True)) < 13);
			Global.DrawerColor = Custom String("Purple");
		Else If(Y Component Of(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(
				Event Player) * 1000, Null, Event Player, True)) < 15);
			Global.DrawerColor = Custom String("Blue");
		Else If(Y Component Of(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(
				Event Player) * 1000, Null, Event Player, True)) < 17);
			Global.DrawerColor = Custom String("Sky");
		Else;
			Global.DrawerColor = Custom String("Green");
	}
}

rule("Trash")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		Distance Between(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(Event Player)
			* 1000, Null, Event Player, True), Vector(20, 9.500, 11)) <= 1;
		Global.StartPictionary == True;
		Global.Drawer == Event Player;
		Is Button Held(Event Player, Primary Fire) == True;
	}

	actions
	{
		Destroy All Effects;
		Wait(0.020, Ignore Condition);
		Call Subroutine(Pictionary);
		Global.NumOfEffects = 0;
	}
}

rule("Drawer Select Word 0")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		Distance Between(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(Event Player)
			* 1000, Null, Event Player, True), Vector(20, 19.350, 0)) <= 0.800;
		Global.StartPictionary == True;
		Global.Drawer == Event Player;
		Is Button Held(Event Player, Primary Fire) == True;
		Global.ChoosingWord == False;
	}

	actions
	{
		Global.PictionaryWord = Global.AllWordsArray[0];
		Chase Global Variable At Rate(Timer, 0, 1, Destination and Rate);
		Destroy All In-World Text;
		Destroy All Effects;
		Wait(0.050, Ignore Condition);
		Call Subroutine(Keyboard);
		Call Subroutine(Pictionary);
		Create In-World Text(Event Player, Global.PictionaryWord, Vector(20, 24, 0), 2.500, Do Not Clip, Visible To Position and String,
			White, Default Visibility);
		Wait(0.250, Ignore Condition);
		Global.ChoosingWord = True;
		Global.DrawerColor = Custom String("White");
		Global.DrawerRadius = 0.600;
		Global.NumOfEffects = 0;
	}
}

rule("Drawer Select Word 1")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		Distance Between(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(Event Player)
			* 1000, Null, Event Player, True), Vector(20, 16.250, 0)) <= 0.800;
		Global.StartPictionary == True;
		Global.Drawer == Event Player;
		Is Button Held(Event Player, Primary Fire) == True;
		Global.ChoosingWord == False;
	}

	actions
	{
		Global.PictionaryWord = Global.AllWordsArray[1];
		Chase Global Variable At Rate(Timer, 0, 1, Destination and Rate);
		Destroy All In-World Text;
		Destroy All Effects;
		Wait(0.050, Ignore Condition);
		Call Subroutine(Keyboard);
		Call Subroutine(Pictionary);
		Create In-World Text(Event Player, Global.PictionaryWord, Vector(20, 24, 0), 2.500, Do Not Clip, Visible To Position and String,
			White, Default Visibility);
		Wait(0.250, Ignore Condition);
		Global.ChoosingWord = True;
		Global.DrawerColor = Custom String("White");
		Global.DrawerRadius = 0.600;
		Global.NumOfEffects = 0;
	}
}

rule("Drawer Select Word 2")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		Distance Between(Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player)   Facing Direction Of(Event Player)
			* 1000, Null, Event Player, True), Vector(20, 13.250, 0)) <= 0.800;
		Global.StartPictionary == True;
		Global.Drawer == Event Player;
		Is Button Held(Event Player, Primary Fire) == True;
		Global.ChoosingWord == False;
	}

	actions
	{
		Global.PictionaryWord = Global.AllWordsArray[2];
		Chase Global Variable At Rate(Timer, 0, 1, Destination and Rate);
		Destroy All In-World Text;
		Destroy All Effects;
		Wait(0.050, Ignore Condition);
		Call Subroutine(Keyboard);
		Call Subroutine(Pictionary);
		Create In-World Text(Event Player, Global.PictionaryWord, Vector(20, 24, 0), 2.500, Do Not Clip, Visible To Position and String,
			White, Default Visibility);
		Wait(0.250, Ignore Condition);
		Global.ChoosingWord = True;
		Global.DrawerColor = Custom String("White");
		Global.DrawerRadius = 0.600;
		Global.NumOfEffects = 0;
	}
}

rule("Times Up or Everyone Guesses")
{
	event
	{
		Ongoing - Global;
	}

	conditions
	{
		(Global.Timer == 0 || Global.NumGuessed == Count Of(Global.PlayerArray) - 1) == True;
		Global.StartPictionary == True;
	}

	actions
	{
		Global.Drawer = Null;
		Stop Chasing Global Variable(Timer);
		Global.Timer = -1;
		Play Effect(All Players(All Teams), Debuff Impact Sound, White, Vector(0, 0, 0), 200);
		Clear Status(All Players(All Teams), Phased Out);
		Set Status(All Players(All Teams), Null, Rooted, 8);
		Wait(0.500, Ignore Condition);
		Big Message(All Players(All Teams), Custom String("The Word Was: {0}", Global.PictionaryWord));
		Wait(5, Ignore Condition);
		Teleport(All Players(All Teams), Vector(-8, 0, Random Real(-8, 8)));
		Set Gravity(All Players(All Teams), 100);
		Set Status(All Players(All Teams), Null, Phased Out, 9999);
		Call Subroutine(NewDrawer);
	}
}

rule("Create Typing Text")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		Global.Drawer != Event Player;
		Global.ChoosingWord == True;
	}

	actions
	{
		Create In-World Text(Event Player, Event Player.WordArray, Eye Position(Event Player)   Facing Direction Of(Event Player), 1.500,
			Do Not Clip, Visible To Position and String, White, Default Visibility);
	}
}

rule("End Game")
{
	event
	{
		Ongoing - Global;
	}

	conditions
	{
		Global.Turn >= Count Of(Global.PlayerArray) - 1;
		Global.RoundNum == 5;
	}

	actions
	{
		Call Subroutine(Winner);
		Big Message(All Players(All Teams), Custom String("{0} Wins!!!", Global.Winner));
		Wait(5, Ignore Condition);
		Global.PlayerArray = Empty Array;
		Global.StartPictionary = False;
		Global.Timer = -1;
		Global.RoundNum = 1;
		Destroy All Effects;
		Destroy All HUD Text;
		Destroy All In-World Text;
		Wait(0.200, Ignore Condition);
	}
}

rule("Winner Subroutine")
{
	event
	{
		Subroutine;
		Winner;
	}

	actions
	{
		If(Global.PlayerArray[0].Points > Global.PlayerArray[1].Points);
			Global.Winner = Global.PlayerArray[0];
		Else;
			Global.Winner = Global.PlayerArray[1];
		End;
		Global.ForLoop = 0;
		For Global Variable(ForLoop, 0, Count Of(Global.PlayerArray), 1);
			If(Global.PlayerArray[Global.ForLoop].Points > Global.Winner.Points);
				Global.Winner = Global.PlayerArray[Global.ForLoop];
			End;
		End;
	}
}

rule("Crossing Red Line")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		X Component Of(Position Of(Event Player)) > -4;
		Global.StartPictionary == True;
		Global.Drawer != Event Player;
	}

	actions
	{
		Apply Impulse(Event Player, Vector(-1, 0, 0), 10, To World, Cancel Contrary Motion);
		Wait(0.016, Ignore Condition);
		Loop If Condition Is True;
	}
}

rule("Drawer Flies Away")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		Distance Between(Position Of(Global.Drawer), Vector(2, 13.425, 0)) >= 2;
		Global.Drawer == Event Player;
	}

	actions
	{
		Set Gravity(Event Player, 100);
		Teleport(Event Player, Vector(2, 0, 0));
		Wait(0.250, Ignore Condition);
		Set Gravity(Event Player, 0);
		Wait(0.250, Ignore Condition);
		Set Facing(Global.Drawer, Vector(1, 0.070, 0), To World);
		Teleport(Global.Drawer, Vector(2, 12, 0));
	}
}

disabled rule("Create Bot [testing]")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		Is Button Held(Event Player, Interact) == True;
	}

	actions
	{
		Create Dummy Bot(Hero(Ana), All Teams, -1, Position Of(Event Player), Vector(0, 0, 0));
	}
}