Create
Return to post

Comparing difference between and

View raw
  • settings
  • {
  • main
  • {
  • Description: "Randomat! Every x seconds a new random event shakes up your round of Deathmatch. More info at workshop.codes/randomat"
  • }
  • lobby
  • {
  • Allow Players Who Are In Queue: Yes
  • Match Voice Chat: Enabled
  • }
  • modes
  • {
  • Deathmatch
  • {
  • Game Length In Minutes: 15
  • Score To Win: 50
  • disabled maps
  • {
  • Workshop Chamber
  • Workshop Expanse
  • Workshop Island
  • }
  • }
  • General
  • {
  • Game Mode Start: Immediately
  • Hero Limit: Off
  • }
  • }
  • }
  • variables
  • {
  • global:
  • 0: Timer
  • 1: Interval
  • 2: Player1
  • 3: Player2
  • 4: PositionPlayer1
  • 5: PositionPlayer2
  • 6: FacingPlayer1
  • 7: FacingPlayer2
  • 8: CurrentRandomEffect
  • 9: Radius
  • 10: PositionsArray
  • 12: CurrentPosition
  • 13: DamageDealt
  • 14: ArrayForRandomat
  • 15: RandomatTimer
  • 21: RandomnessIntensifiesArray
  • 22: Loop
  • 23: RandomValue
  • 24: NewEventStarted
  • 26: JumpHeight
  • 27: TotalAmountOfEffects
  • 28: AllCoinPositions
  • 29: PositionOfCurrentCoin
  • 30: CoinLoop
  • 31: MaxCoins
  • 32: CoinEffectsArray
  • 33: InfiniteGame
  • 34: MomentumMultiplier
  • 35: FlopperDamage
  • 36: TrueFalseArray
  • player:
  • 0: SpawnTimer
  • 1: RandomPlayer
  • 2: HasDied
  • 3: FallSpeed
  • 4: DamageToBeDone
  • 5: LastDamagedBy
  • 6: PlayerCoinLoop
  • 7: AmountOfCollectedCoins
  • 8: AmountOfCoinsToDrop
  • 9: DroppedCoinLoop
  • 10: PlayersInRadius
  • 11: ShortLoop
  • 12: PositivePolarity
  • 13: PolarityEffect
  • 14: PolarityIcon
  • 15: PolarityHud
  • }
  • subroutines
  • {
  • 0: MakeRandomnessArray
  • 1: HardReset
  • 2: SpawnCoin
  • }
  • disabled rule("Randomat! - More info at https://workshop.codes/randomat")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • }
  • rule("Game Settings")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • actions
  • {
  • "Change me to adjust how often Randomat effects happen"
  • Set Global Variable(RandomatTimer, 60);
  • Set Global Variable(RandomatTimer, 10);
  • "Set me to False to end the game after the time ends, or after someone reaches the score limit. Set me to True to keep the game going forever."
  • Set Global Variable(InfiniteGame, True);
  • }
  • }
  • rule("Infinite timer")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Match Time < 1800;
  • Global Variable(InfiniteGame) == True;
  • Is Game In Progress == True;
  • }
  • actions
  • {
  • Set Match Time(3599);
  • }
  • }
  • rule("Disable default game ending")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Global Variable(InfiniteGame) == True;
  • }
  • actions
  • {
  • Disable Built-In Game Mode Completion;
  • Disable Built-In Game Mode Announcer;
  • Disable Built-In Game Mode Music;
  • }
  • }
  • rule("Subroutine - Make randomness array")
  • {
  • event
  • {
  • Subroutine;
  • MakeRandomnessArray;
  • }
  • actions
  • {
  • "Total random events in number (+1)"
  • For Global Variable(Loop, 0, Global Variable(TotalAmountOfEffects), 1);
  • Set Global Variable At Index(ArrayForRandomat, Global Variable(Loop), Global Variable(Loop));
  • End;
  • }
  • }
  • rule("Subroutine - Hard reset of variables and states")
  • {
  • event
  • {
  • Subroutine;
  • HardReset;
  • }
  • actions
  • {
  • Start Forcing Throttle(Event Player, 0, 1, 0, 1, 0, 1);
  • Set Gravity(Event Player, 100);
  • Allow Button(Event Player, Jump);
  • Set Invisible(Event Player, None);
  • Set Player Variable(Event Player, HasDied, False);
  • }
  • }
  • rule("Initialise")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • actions
  • {
  • "Make sure I start empty to prevent crazy things"
  • Set Global Variable(CurrentRandomEffect, 1000);
  • Set Global Variable(RandomnessIntensifiesArray, Empty Array);
  • Set Global Variable(NewEventStarted, False);
  • Set Global Variable(TotalAmountOfEffects, 13);
  • Set Global Variable(TotalAmountOfEffects, 14);
  • Set Global Variable(MomentumMultiplier, False);
  • "This array is used for several random effects that require unique numbers"
  • Call Subroutine(MakeRandomnessArray);
  • Set Global Variable At Index(TrueFalseArray, 0, True);
  • Set Global Variable At Index(TrueFalseArray, 1, False);
  • }
  • }
  • rule("Cycle Random Effect")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • actions
  • {
  • "Show countdown 3 seconds before change"
  • Small Message(All Players(All Teams), Custom String("New Randomat incoming...", Null, Null, Null));
  • Wait(1, Ignore Condition);
  • Small Message(All Players(All Teams), Custom String("3...", Null, Null, Null));
  • Wait(1, Ignore Condition);
  • Small Message(All Players(All Teams), Custom String("2...", Null, Null, Null));
  • Wait(1, Ignore Condition);
  • Small Message(All Players(All Teams), Custom String("1...", Null, Null, Null));
  • Set Global Variable(MomentumMultiplier, True);
  • Wait(1, Ignore Condition);
  • "Reset all values and effects"
  • Set Global Variable(CurrentRandomEffect, 1000);
  • Set Global Variable(RandomnessIntensifiesArray, Empty Array);
  • Destroy All HUD Text;
  • Destroy All Icons;
  • Destroy All In-World Text;
  • Destroy All Effects;
  • Set Global Variable(NewEventStarted, True);
  • "Re-create HUD"
  • Create HUD Text(All Players(All Teams), Null, String("{0} {1} {2}", Custom String("A new Random effect will occur every", Null,
  • Null, Null), Global Variable(RandomatTimer), Custom String("seconds.", Null, Null, Null)), Null, Right, 0, White, White, White,
  • Visible To and String, Default Visibility);
  • Wait(0.250, Ignore Condition);
  • Set Global Variable(MomentumMultiplier, False);
  • "Set the new event"
  • Set Global Variable(CurrentRandomEffect, Random Value In Array(Global Variable(ArrayForRandomat)));
  • Set Global Variable(ArrayForRandomat, Remove From Array(Global Variable(ArrayForRandomat), Global Variable(CurrentRandomEffect)));
  • "Re-create HUD"
  • Create HUD Text(All Players(All Teams), Null, Custom String("Current Randomat", Null, Null, Null), Null, Left, -1, White, Blue,
  • Blue, Visible To and String, Default Visibility);
  • Wait(Subtract(Global Variable(RandomatTimer), 4), Ignore Condition);
  • Loop;
  • }
  • }
  • rule("New event starts - Player event")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Global Variable(NewEventStarted) == True;
  • }
  • actions
  • {
  • Start Forcing Throttle(Event Player, 0, 1, 0, 1, 0, 1);
  • Set Gravity(Event Player, 100);
  • Allow Button(Event Player, Jump);
  • Set Invisible(Event Player, None);
  • Set Player Variable(Event Player, HasDied, False);
  • Set Player Variable(Event Player, FallSpeed, 0);
  • Play Effect(Event Player, Ring Explosion Sound, White, Event Player, 100);
  • Big Message(Event Player, Custom String("Randomat!", Null, Null, Null));
  • Set Global Variable(NewEventStarted, False);
  • Stop Camera(Event Player);
  • }
  • }
  • disabled rule("Spawn bots - For debugging")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Is Button Held(Event Player, Crouch) == True;
  • Is Button Held(Event Player, Interact) == True;
  • }
  • actions
  • {
  • Create Dummy Bot(Random Value In Array(All Heroes), Opposite Team Of(Team Of(Event Player)), -1, Add(Event Player, Multiply(
  • Facing Direction Of(Event Player), 0.500)), Facing Direction Of(Event Player));
  • }
  • }
  • disabled rule("Dev stuff")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • actions
  • {
  • Set Global Variable At Index(RandomnessIntensifiesArray, 0, 11);
  • Set Global Variable At Index(RandomnessIntensifiesArray, 0, 12);
  • }
  • }
  • disabled rule("Dev stuff - Player event")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • }
  • disabled rule("----- Swap! ----- = 0")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • }
  • rule("Settings")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Or(Compare(Global Variable(CurrentRandomEffect), ==, 0), Array Contains(Global Variable(RandomnessIntensifiesArray), 0)) == True;
  • }
  • actions
  • {
  • "Change this number to adjust the frequency of Swaps"
  • Set Global Variable(Interval, 5);
  • }
  • }
  • rule("Initialise")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Or(Compare(Global Variable(CurrentRandomEffect), ==, 0), Array Contains(Global Variable(RandomnessIntensifiesArray), 0)) == True;
  • }
  • actions
  • {
  • Set Global Variable(Timer, Global Variable(Interval));
  • Create HUD Text(All Players(All Teams), Null, String("{0} {1} {2}", Custom String("Every", Null, Null, Null), Global Variable(
  • Interval), Custom String("seconds 2 random players will swap position.", Null, Null, Null)), Null, Left, 0, White, White,
  • White, Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Custom String("Swap!", Null, Null, Null), Null, Null, Left, 0, Yellow, White, White,
  • Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Null, Custom String(" ", Null, Null, Null), Null, Left, 0, White, White, White,
  • Visible To and String, Default Visibility);
  • }
  • }
  • rule("Timer")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Or(Compare(Global Variable(CurrentRandomEffect), ==, 0), Array Contains(Global Variable(RandomnessIntensifiesArray), 0)) == True;
  • Global Variable(Timer) == Global Variable(Interval);
  • }
  • actions
  • {
  • Chase Global Variable At Rate(Timer, 0, 1, Destination and Rate);
  • }
  • }
  • rule("Swap 2 random players")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Or(Compare(Global Variable(CurrentRandomEffect), ==, 0), Array Contains(Global Variable(RandomnessIntensifiesArray), 0)) == True;
  • Global Variable(Timer) <= 0;
  • Count Of(All Living Players(All Teams)) > 1;
  • }
  • actions
  • {
  • Set Global Variable(Player1, Random Value In Array(All Living Players(All Teams)));
  • Set Global Variable(Player2, Random Value In Array(Remove From Array(All Living Players(All Teams), Global Variable(Player1))));
  • Set Global Variable(PositionPlayer1, Position Of(Global Variable(Player1)));
  • Set Global Variable(PositionPlayer2, Position Of(Global Variable(Player2)));
  • Set Global Variable(FacingPlayer1, Facing Direction Of(Global Variable(Player1)));
  • Set Global Variable(FacingPlayer2, Facing Direction Of(Global Variable(Player2)));
  • Skip If(Or(Compare(Global Variable(PositionPlayer1), ==, 0), Compare(Global Variable(PositionPlayer2), ==, 0)), 11);
  • Big Message(All Players(All Teams), Custom String("Swap!", Null, Null, Null));
  • Teleport(Global Variable(Player1), Global Variable(PositionPlayer2));
  • Set Facing(Global Variable(Player1), Global Variable(FacingPlayer2), To World);
  • Teleport(Global Variable(Player2), Global Variable(PositionPlayer1));
  • Set Facing(Global Variable(Player2), Global Variable(FacingPlayer1), To World);
  • Play Effect(All Players(All Teams), Good Pickup Effect, Yellow, Global Variable(Player1), 1);
  • Play Effect(All Players(All Teams), Ring Explosion, Yellow, Global Variable(Player1), 2);
  • Play Effect(All Players(All Teams), Buff Explosion Sound, Yellow, Global Variable(Player1), 50);
  • Play Effect(All Players(All Teams), Good Pickup Effect, Yellow, Global Variable(Player2), 1);
  • Play Effect(All Players(All Teams), Ring Explosion, Yellow, Global Variable(Player2), 2);
  • Play Effect(All Players(All Teams), Buff Explosion Sound, Yellow, Global Variable(Player2), 50);
  • Set Global Variable(Timer, Global Variable(Interval));
  • }
  • }
  • disabled rule("----- Contagious Bodies ----- = 1")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • }
  • rule("Settings")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Or(Compare(Global Variable(CurrentRandomEffect), ==, 1), Array Contains(Global Variable(RandomnessIntensifiesArray), 1)) == True;
  • }
  • actions
  • {
  • "Change me to adjust the radius of the contagion dropped by dead bodies"
  • Set Global Variable(Radius, 5);
  • "Change me to adjust the damage dealt per second when inside a Contagion blob"
  • Set Global Variable(DamageDealt, 100);
  • }
  • }
  • rule("Initialise")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Or(Compare(Global Variable(CurrentRandomEffect), ==, 1), Array Contains(Global Variable(RandomnessIntensifiesArray), 1)) == True;
  • }
  • actions
  • {
  • Set Global Variable(PositionsArray, Empty Array);
  • Create HUD Text(All Players(All Teams), Null, Custom String(
  • "Dead bodies leave behind a puddle that deals a large amount of damage.", Null, Null, Null), Null, Left, 0, White, White,
  • White, Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Custom String("Contagious Bodies", Null, Null, Null), Null, Null, Left, 0, Purple, White,
  • White, Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Null, Custom String(" ", Null, Null, Null), Null, Left, 0, White, White, White,
  • Visible To and String, Default Visibility);
  • }
  • }
  • rule("Drop Contagion on dead bodies")
  • {
  • event
  • {
  • Player Died;
  • All;
  • All;
  • }
  • conditions
  • {
  • Or(Compare(Global Variable(CurrentRandomEffect), ==, 1), Array Contains(Global Variable(RandomnessIntensifiesArray), 1)) == True;
  • }
  • actions
  • {
  • Set Global Variable(CurrentPosition, Position Of(Event Player));
  • Set Global Variable(PositionsArray, Append To Array(Global Variable(PositionsArray), Global Variable(CurrentPosition)));
  • "Create ring effect"
  • Create Effect(All Players(All Teams), Ring, Purple, Global Variable(CurrentPosition), Global Variable(Radius), None);
  • "Create cloud effect"
  • Create Effect(All Players(All Teams), Cloud, Purple, Vector(X Component Of(Position Of(Event Player)), Subtract(Y Component Of(
  • Position Of(Event Player)), Divide(Global Variable(Radius), 8)), Z Component Of(Position Of(Event Player))), Global Variable(
  • Radius), None);
  • "Create sparkles effect"
  • Create Effect(All Players(All Teams), Sparkles, Purple, Vector(X Component Of(Position Of(Event Player)), Subtract(Y Component Of(
  • Position Of(Event Player)), Divide(Global Variable(Radius), 4)), Z Component Of(Position Of(Event Player))), Global Variable(
  • Radius), None);
  • }
  • }
  • rule("Spawn Protection")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Or(Compare(Global Variable(CurrentRandomEffect), ==, 1), Array Contains(Global Variable(RandomnessIntensifiesArray), 1)) == True;
  • Has Spawned(Event Player) == True;
  • Is Alive(Event Player) == True;
  • }
  • actions
  • {
  • Set Player Variable(Event Player, SpawnTimer, 0);
  • Chase Player Variable Over Time(Event Player, SpawnTimer, 3, 3, Destination and Duration);
  • }
  • }
  • rule("Damage Players in Contagion")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Or(Compare(Global Variable(CurrentRandomEffect), ==, 1), Array Contains(Global Variable(RandomnessIntensifiesArray), 1)) == True;
  • Is True For Any(Global Variable(PositionsArray), Compare(Distance Between(Current Array Element, Event Player), <=,
  • Global Variable(Radius))) == True;
  • Compare(Player Variable(Event Player, SpawnTimer), >=, 2) == True;
  • }
  • actions
  • {
  • Damage(Event Player, Null, Divide(Global Variable(DamageDealt), 4));
  • Wait(0.250, Ignore Condition);
  • Loop If Condition Is True;
  • }
  • }
  • disabled rule("----- Can't stop, Won't stop ----- = 2")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • }
  • rule("Settings")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Or(Compare(Global Variable(CurrentRandomEffect), ==, 2), Array Contains(Global Variable(RandomnessIntensifiesArray), 2)) == True;
  • }
  • }
  • rule("Initialise")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Or(Compare(Global Variable(CurrentRandomEffect), ==, 2), Array Contains(Global Variable(RandomnessIntensifiesArray), 2)) == True;
  • }
  • actions
  • {
  • Create HUD Text(All Players(All Teams), Null, Custom String("You can't stop walking forward!", Null, Null, Null), Null, Left, 0,
  • White, White, White, Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Custom String("Can't stop, Won't stop", Null, Null, Null), Null, Null, Left, 0, Green,
  • White, White, Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Null, Custom String(" ", Null, Null, Null), Null, Left, 0, White, White, White,
  • Visible To and String, Default Visibility);
  • }
  • }
  • rule("All players move forward")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Or(Compare(Global Variable(CurrentRandomEffect), ==, 2), Array Contains(Global Variable(RandomnessIntensifiesArray), 2)) == True;
  • }
  • actions
  • {
  • Start Forcing Throttle(Event Player, 1, 1, 0, 0, 0, 1);
  • }
  • }
  • disabled rule("----- Stay down! ----- = 3")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • }
  • rule("Settings")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Or(Compare(Global Variable(CurrentRandomEffect), ==, 3), Array Contains(Global Variable(RandomnessIntensifiesArray), 3)) == True;
  • }
  • }
  • rule("Initialise")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Or(Compare(Global Variable(CurrentRandomEffect), ==, 3), Array Contains(Global Variable(RandomnessIntensifiesArray), 3)) == True;
  • }
  • actions
  • {
  • Create HUD Text(All Players(All Teams), Null, Custom String("Can't jump, and gravity is heavily increased.", Null, Null, Null),
  • Null, Left, 0, White, White, White, Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Custom String("Stay down!", Null, Null, Null), Null, Null, Left, 0, White, White, White,
  • Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Null, Custom String(" ", Null, Null, Null), Null, Left, 0, White, White, White,
  • Visible To and String, Default Visibility);
  • }
  • }
  • rule("Gravity rules")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Or(Compare(Global Variable(CurrentRandomEffect), ==, 3), Array Contains(Global Variable(RandomnessIntensifiesArray), 3)) == True;
  • }
  • actions
  • {
  • Set Gravity(Event Player, 1500);
  • }
  • }
  • rule("Disable jump")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Or(Compare(Global Variable(CurrentRandomEffect), ==, 3), Array Contains(Global Variable(RandomnessIntensifiesArray), 3)) == True;
  • }
  • actions
  • {
  • Disallow Button(Event Player, Jump);
  • }
  • }
  • disabled rule("----- Hard of seeing ----- = 4")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • }
  • rule("Settings")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Or(Compare(Global Variable(CurrentRandomEffect), ==, 4), Array Contains(Global Variable(RandomnessIntensifiesArray), 4)) == True;
  • }
  • }
  • rule("Initialise")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Or(Compare(Global Variable(CurrentRandomEffect), ==, 4), Array Contains(Global Variable(RandomnessIntensifiesArray), 4)) == True;
  • }
  • actions
  • {
  • Create HUD Text(All Players(All Teams), Null, Custom String("Everyone is invisible but can be found by their hero icon", Null,
  • Null, Null), Null, Left, 0, White, White, White, Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Custom String("Hard of seeing", Null, Null, Null), Null, Null, Left, 0, Turquoise, White,
  • White, Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Null, Custom String(" ", Null, Null, Null), Null, Left, 0, White, White, White,
  • Visible To and String, Default Visibility);
  • }
  • }
  • rule("Make all players invisible")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Or(Compare(Global Variable(CurrentRandomEffect), ==, 4), Array Contains(Global Variable(RandomnessIntensifiesArray), 4)) == True;
  • }
  • actions
  • {
  • Set Invisible(Event Player, All);
  • Create In-World Text(All Players(All Teams), Hero Icon String(Hero Of(Event Player)), Event Player, 2.500, Clip Against Surfaces,
  • Visible To Position and String, White, Default Visibility);
  • }
  • }
  • disabled rule("----- This could get messy ----- = 5")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • }
  • rule("Settings")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Or(Compare(Global Variable(CurrentRandomEffect), ==, 5), Array Contains(Global Variable(RandomnessIntensifiesArray), 5)) == True;
  • }
  • }
  • rule("Initialise")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Or(Compare(Global Variable(CurrentRandomEffect), ==, 5), Array Contains(Global Variable(RandomnessIntensifiesArray), 5)) == True;
  • }
  • actions
  • {
  • Create HUD Text(All Players(All Teams), Null, Custom String("When respawning you spawn right on top of someone else", Null, Null,
  • Null), Null, Left, 0, White, White, White, Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Custom String("This could get messy", Null, Null, Null), Null, Null, Left, 0, Red, White,
  • White, Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Null, Custom String(" ", Null, Null, Null), Null, Left, 0, White, White, White,
  • Visible To and String, Default Visibility);
  • }
  • }
  • rule("Player died")
  • {
  • event
  • {
  • Player Died;
  • All;
  • All;
  • }
  • conditions
  • {
  • Or(Compare(Global Variable(CurrentRandomEffect), ==, 5), Array Contains(Global Variable(RandomnessIntensifiesArray), 5)) == True;
  • }
  • actions
  • {
  • Set Player Variable(Event Player, HasDied, True);
  • }
  • }
  • rule("Teleport player on spawn")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Or(Compare(Global Variable(CurrentRandomEffect), ==, 5), Array Contains(Global Variable(RandomnessIntensifiesArray), 5)) == True;
  • Is Alive(Event Player) == True;
  • Count Of(All Players(All Teams)) > 1;
  • Count Of(All Living Players(All Teams)) > 0;
  • Player Variable(Event Player, HasDied) == True;
  • }
  • actions
  • {
  • Set Player Variable(Event Player, RandomPlayer, Random Value In Array(Remove From Array(All Living Players(All Teams),
  • Event Player)));
  • Teleport(Event Player, Nearest Walkable Position(Vector(X Component Of(Position Of(Player Variable(Event Player, RandomPlayer))),
  • Y Component Of(Add(Position Of(Player Variable(Event Player, RandomPlayer)), 0.500)), Z Component Of(Position Of(
  • Player Variable(Event Player, RandomPlayer))))));
  • }
  • }
  • disabled rule("----- I don't do \"bouncy\" ----- = 6")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • }
  • rule("Settings")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Or(Compare(Global Variable(CurrentRandomEffect), ==, 6), Array Contains(Global Variable(RandomnessIntensifiesArray), 6)) == True;
  • }
  • actions
  • {
  • "Change me to adjust the initial radius of the Resource"
  • Set Global Variable(JumpHeight, 10);
  • }
  • }
  • rule("Initialise")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Or(Compare(Global Variable(CurrentRandomEffect), ==, 6), Array Contains(Global Variable(RandomnessIntensifiesArray), 6)) == True;
  • }
  • actions
  • {
  • Create HUD Text(All Players(All Teams), Null, Custom String("You can't stop bouncing!", Null, Null, Null), Null, Left, 0, Sky Blue,
  • White, White, Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Custom String("I don't do 'bouncy'", Null, Null, Null), Null, Null, Left, 0, Aqua, White,
  • White, Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Null, Custom String(" ", Null, Null, Null), Null, Left, 0, White, White, White,
  • Visible To and String, Default Visibility);
  • }
  • }
  • rule("Bouncy if on the ground")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Or(Compare(Global Variable(CurrentRandomEffect), ==, 6), Array Contains(Global Variable(RandomnessIntensifiesArray), 6)) == True;
  • Is On Ground(Event Player) == True;
  • }
  • actions
  • {
  • Apply Impulse(Event Player, Up, Global Variable(JumpHeight), To Player, Incorporate Contrary Motion);
  • Wait(0.250, Ignore Condition);
  • Loop If Condition Is True;
  • }
  • }
  • disabled rule("----- Fear of heights ----- = 7")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • }
  • rule("Settings")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Or(Compare(Global Variable(CurrentRandomEffect), ==, 7), Array Contains(Global Variable(RandomnessIntensifiesArray), 7)) == True;
  • }
  • actions
  • {
  • "Change me to adjust how much damage is dealt when hitting the floor. Higher = more."
  • Set Global Variable(DamageDealt, 12);
  • }
  • }
  • rule("Initialise")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Or(Compare(Global Variable(CurrentRandomEffect), ==, 7), Array Contains(Global Variable(RandomnessIntensifiesArray), 7)) == True;
  • }
  • actions
  • {
  • Create HUD Text(All Players(All Teams), Null, Custom String(
  • "Fall damage is enabled! Kill credit goes to those who last hit the target.", Null, Null, Null), Null, Left, 0, Sky Blue,
  • White, White, Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Custom String("Fear of heights", Null, Null, Null), Null, Null, Left, 0, Sky Blue, White,
  • White, Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Null, Custom String(" ", Null, Null, Null), Null, Left, 0, White, White, White,
  • Visible To and String, Default Visibility);
  • }
  • }
  • rule("Check vertical speed")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Or(Compare(Global Variable(CurrentRandomEffect), ==, 7), Array Contains(Global Variable(RandomnessIntensifiesArray), 7)) == True;
  • Altitude Of(Event Player) < 1;
  • Is In Air(Event Player) == True;
  • }
  • actions
  • {
  • Set Player Variable(Event Player, FallSpeed, Vertical Speed Of(Event Player));
  • }
  • }
  • rule("Player is on the ground")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Or(Compare(Global Variable(CurrentRandomEffect), ==, 7), Array Contains(Global Variable(RandomnessIntensifiesArray), 7)) == True;
  • Is On Ground(Event Player) == True;
  • Player Variable(Event Player, FallSpeed) < -10;
  • }
  • actions
  • {
  • Set Player Variable(Event Player, DamageToBeDone, Multiply(Multiply(Player Variable(Event Player, FallSpeed), Global Variable(
  • DamageDealt)), -1));
  • Damage(Event Player, Player Variable(Event Player, LastDamagedBy), Player Variable(Event Player, DamageToBeDone));
  • Play Effect(All Players(All Teams), Explosion Sound, White, Event Player, 5);
  • Play Effect(All Players(All Teams), Bad Explosion, Sky Blue, Event Player, 2);
  • }
  • }
  • rule("Set attacker")
  • {
  • event
  • {
  • Player Took Damage;
  • All;
  • All;
  • }
  • conditions
  • {
  • Or(Compare(Global Variable(CurrentRandomEffect), ==, 7), Array Contains(Global Variable(RandomnessIntensifiesArray), 7)) == True;
  • }
  • actions
  • {
  • Set Player Variable(Event Player, LastDamagedBy, Attacker);
  • }
  • }
  • rule("Unset attacker")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Or(Compare(Global Variable(CurrentRandomEffect), ==, 7), Array Contains(Global Variable(RandomnessIntensifiesArray), 7)) == True;
  • Health(Event Player) == Max Health(Event Player);
  • }
  • actions
  • {
  • Set Player Variable(Event Player, LastDamagedBy, Null);
  • }
  • }
  • disabled rule("----- Bounty Hunter ----- = 8")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • }
  • rule("Settings")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Or(Compare(Global Variable(CurrentRandomEffect), ==, 8), Array Contains(Global Variable(RandomnessIntensifiesArray), 8)) == True;
  • }
  • actions
  • {
  • "Change me to adjust how many coins spawn on the map. If there are performance problems, reducing this number will certainly help. Don't go higher than 100."
  • Set Global Variable(MaxCoins, 100);
  • }
  • }
  • rule("Initialise")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Or(Compare(Global Variable(CurrentRandomEffect), ==, 8), Array Contains(Global Variable(RandomnessIntensifiesArray), 8)) == True;
  • }
  • actions
  • {
  • Set Global Variable(AllCoinPositions, Empty Array);
  • Set Global Variable(CoinEffectsArray, Empty Array);
  • Create HUD Text(All Players(All Teams), Null, Custom String(
  • "The player with the most coins at the end of the round gets +5 added to their Kill score", Null, Null, Null), Null, Left, 0,
  • White, White, White, Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Null, Custom String(
  • "Pick up the coins dropped all over the map. Getting killed will drop half your coins.", Null, Null, Null), Null, Left, 0,
  • White, White, White, Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Custom String("Bounty Hunter", Null, Null, Null), Null, Null, Left, 0, Orange, White,
  • White, Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Null, Custom String(" ", Null, Null, Null), Null, Left, 0, White, White, White,
  • Visible To and String, Default Visibility);
  • }
  • }
  • rule("Initialise Player")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Or(Compare(Global Variable(CurrentRandomEffect), ==, 8), Array Contains(Global Variable(RandomnessIntensifiesArray), 8)) == True;
  • }
  • actions
  • {
  • Set Player Variable(Event Player, AmountOfCoinsToDrop, 0);
  • Set Player Variable(Event Player, PlayerCoinLoop, 0);
  • Set Player Variable(Event Player, AmountOfCollectedCoins, 0);
  • Create HUD Text(Event Player, String("{0}: {1}", Custom String("Coins Collected", Null, Null, Null), Player Variable(Event Player,
  • AmountOfCollectedCoins), Null), Null, Null, Top, 0, Orange, White, White, Visible To and String, Default Visibility);
  • Create In-World Text(All Players(All Teams), Player Variable(Event Player, AmountOfCollectedCoins), Event Player, 2,
  • Clip Against Surfaces, Visible To Position and String, Orange, Default Visibility);
  • }
  • }
  • rule("Subroutine - Spawn a single coin")
  • {
  • event
  • {
  • Subroutine;
  • SpawnCoin;
  • }
  • actions
  • {
  • "Get the position of a random player"
  • Set Global Variable(PositionOfCurrentCoin, Position Of(Random Value In Array(All Living Players(All Teams))));
  • "Get a position near a player"
  • Set Global Variable(PositionOfCurrentCoin, Vector(Add(X Component Of(Global Variable(PositionOfCurrentCoin)), Random Real(-20,
  • 20)), Add(Y Component Of(Global Variable(PositionOfCurrentCoin)), 0.500), Add(Z Component Of(Global Variable(
  • PositionOfCurrentCoin)), Random Real(-20, 20))));
  • "Get nearest walkable position"
  • Set Global Variable(PositionOfCurrentCoin, Nearest Walkable Position(Global Variable(PositionOfCurrentCoin)));
  • "Set position in array"
  • Set Global Variable At Index(AllCoinPositions, Global Variable(CoinLoop), Global Variable(PositionOfCurrentCoin));
  • "Create the coin effect"
  • Create Effect(All Players(All Teams), Sphere, Orange, Value In Array(Global Variable(AllCoinPositions), Global Variable(CoinLoop)),
  • 0.250, None);
  • Set Global Variable At Index(CoinEffectsArray, Global Variable(CoinLoop), Last Created Entity);
  • }
  • }
  • rule("Spawn Coins")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Or(Compare(Global Variable(CurrentRandomEffect), ==, 8), Array Contains(Global Variable(RandomnessIntensifiesArray), 8)) == True;
  • Count Of(All Players(All Teams)) > 1;
  • }
  • actions
  • {
  • Wait(0.250, Ignore Condition);
  • For Global Variable(CoinLoop, 0, Global Variable(MaxCoins), 1);
  • Call Subroutine(SpawnCoin);
  • disabled Wait(0.250, Ignore Condition);
  • End;
  • }
  • }
  • rule("Check if player is on a coin")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Or(Compare(Global Variable(CurrentRandomEffect), ==, 8), Array Contains(Global Variable(RandomnessIntensifiesArray), 8)) == True;
  • Is True For Any(Global Variable(AllCoinPositions), Compare(Distance Between(Current Array Element, Event Player), <=, 1)) == True;
  • }
  • actions
  • {
  • For Player Variable(Event Player, PlayerCoinLoop, 0, Count Of(Global Variable(AllCoinPositions)), 1);
  • If(Compare(Distance Between(Value In Array(Global Variable(AllCoinPositions), Player Variable(Event Player, PlayerCoinLoop)),
  • Event Player), <=, 1));
  • Set Global Variable At Index(AllCoinPositions, Player Variable(Event Player, PlayerCoinLoop), Vector(0, 0, 0));
  • Modify Player Variable(Event Player, AmountOfCollectedCoins, Add, 1);
  • Destroy Effect(Value In Array(Global Variable(CoinEffectsArray), Player Variable(Event Player, PlayerCoinLoop)));
  • Play Effect(Event Player, Buff Explosion Sound, White, Event Player, 75);
  • End;
  • End;
  • }
  • }
  • rule("Player Died with Coins")
  • {
  • event
  • {
  • Player Died;
  • All;
  • All;
  • }
  • conditions
  • {
  • Or(Compare(Global Variable(CurrentRandomEffect), ==, 8), Array Contains(Global Variable(RandomnessIntensifiesArray), 8)) == True;
  • Player Variable(Event Player, AmountOfCollectedCoins) > 0;
  • }
  • actions
  • {
  • Play Effect(All Players(All Teams), Good Explosion, Orange, Event Player, 3);
  • "Get number of coins to drop"
  • Set Player Variable(Event Player, AmountOfCoinsToDrop, Round To Integer(Divide(Player Variable(Event Player,
  • AmountOfCollectedCoins), 2), Up));
  • "Set new coin amount"
  • Set Player Variable(Event Player, AmountOfCollectedCoins, Subtract(Player Variable(Event Player, AmountOfCollectedCoins),
  • Player Variable(Event Player, AmountOfCoinsToDrop)));
  • "Loop to drop all coins"
  • For Player Variable(Event Player, DroppedCoinLoop, 1, Player Variable(Event Player, AmountOfCoinsToDrop), 1);
  • Modify Global Variable(CoinLoop, Add, 1);
  • "Get a position near a player"
  • Set Global Variable(PositionOfCurrentCoin, Vector(Add(X Component Of(Position Of(Event Player)), Random Real(-3, 3)), Add(
  • Y Component Of(Position Of(Event Player)), 0.500), Add(Z Component Of(Position Of(Event Player)), Random Real(-3, 3))));
  • "Get nearest walkable position"
  • Set Global Variable(PositionOfCurrentCoin, Nearest Walkable Position(Global Variable(PositionOfCurrentCoin)));
  • "Set position in array"
  • Set Global Variable At Index(AllCoinPositions, Global Variable(CoinLoop), Global Variable(PositionOfCurrentCoin));
  • "Create the coin effect"
  • Create Effect(All Players(All Teams), Sphere, Orange, Value In Array(Global Variable(AllCoinPositions), Global Variable(CoinLoop)),
  • 0.250, None);
  • Set Global Variable At Index(CoinEffectsArray, Global Variable(CoinLoop), Last Created Entity);
  • End;
  • }
  • }
  • rule("On end")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Or(Compare(Global Variable(CurrentRandomEffect), ==, 8), Array Contains(Global Variable(RandomnessIntensifiesArray), 8)) == True;
  • Global Variable(MomentumMultiplier) == True;
  • }
  • actions
  • {
  • Modify Player Score(Last Of(Sorted Array(All Players(All Teams), Player Variable(Current Array Element, AmountOfCollectedCoins))),
  • 5);
  • }
  • }
  • disabled rule("----- Send 'em flying! ----- = 9")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • }
  • rule("Settings")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Or(Compare(Global Variable(CurrentRandomEffect), ==, 9), Array Contains(Global Variable(RandomnessIntensifiesArray), 9)) == True;
  • }
  • actions
  • {
  • "Change me to adjust how for people go flying"
  • Set Global Variable(MomentumMultiplier, 2);
  • }
  • }
  • rule("Initialise")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Or(Compare(Global Variable(CurrentRandomEffect), ==, 9), Array Contains(Global Variable(RandomnessIntensifiesArray), 9)) == True;
  • }
  • actions
  • {
  • Create HUD Text(All Players(All Teams), Null, Custom String("The more damage you deal, the further they fly.", Null, Null, Null),
  • Null, Left, 0, White, White, White, Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Null, Custom String("Damaging someone pushes them back away from you.", Null, Null, Null),
  • Null, Left, 0, White, White, White, Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Custom String("Send 'em flying!", Null, Null, Null), Null, Null, Left, 0, Blue, White,
  • White, Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Null, Custom String(" ", Null, Null, Null), Null, Left, 0, White, White, White,
  • Visible To and String, Default Visibility);
  • }
  • }
  • rule("Player takes damage")
  • {
  • event
  • {
  • Player Took Damage;
  • All;
  • All;
  • }
  • conditions
  • {
  • Or(Compare(Global Variable(CurrentRandomEffect), ==, 9), Array Contains(Global Variable(RandomnessIntensifiesArray), 9)) == True;
  • }
  • actions
  • {
  • Skip If(Compare(Event Damage, <, 10), 3);
  • Apply Impulse(Event Player, Up, Multiply(Multiply(Event Damage, Global Variable(MomentumMultiplier)), 0.050), To Player,
  • Incorporate Contrary Motion);
  • Apply Impulse(Event Player, Direction Towards(Attacker, Event Player), Multiply(Multiply(Event Damage, Multiply(Global Variable(
  • MomentumMultiplier), 0.050)), Global Variable(MomentumMultiplier)), To World, Incorporate Contrary Motion);
  • }
  • }
  • disabled rule("----- PHD Flopper ----- = 10")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • }
  • rule("Settings")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Or(Compare(Global Variable(CurrentRandomEffect), ==, 10), Array Contains(Global Variable(RandomnessIntensifiesArray), 10)) == True;
  • }
  • actions
  • {
  • "Change me to adjust how much damage is dealt when hitting the floor. Higher = more."
  • Set Global Variable(FlopperDamage, 250);
  • }
  • }
  • rule("Initialise")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Or(Compare(Global Variable(CurrentRandomEffect), ==, 10), Array Contains(Global Variable(RandomnessIntensifiesArray), 10)) == True;
  • }
  • actions
  • {
  • Create HUD Text(All Players(All Teams), Null, Custom String("Dealing a large amount of damage to those around you.", Null, Null,
  • Null), Null, Left, 0, White, White, White, Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Null, Custom String("Jumping from a great height causes an explosion when landing", Null,
  • Null, Null), Null, Left, 0, White, White, White, Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Custom String("PHD Flopper", Null, Null, Null), Null, Null, Left, 0, Red, White, White,
  • Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Null, Custom String(" ", Null, Null, Null), Null, Left, 0, White, White, White,
  • Visible To and String, Default Visibility);
  • }
  • }
  • rule("Check vertical speed")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Or(Compare(Global Variable(CurrentRandomEffect), ==, 10), Array Contains(Global Variable(RandomnessIntensifiesArray), 10)) == True;
  • Altitude Of(Event Player) < 1;
  • Is In Air(Event Player) == True;
  • }
  • actions
  • {
  • Set Player Variable(Event Player, FallSpeed, Vertical Speed Of(Event Player));
  • }
  • }
  • rule("Player is on the ground")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Or(Compare(Global Variable(CurrentRandomEffect), ==, 10), Array Contains(Global Variable(RandomnessIntensifiesArray), 10)) == True;
  • Is On Ground(Event Player) == True;
  • Player Variable(Event Player, FallSpeed) < -15;
  • }
  • actions
  • {
  • Set Player Variable(Event Player, PlayersInRadius, Empty Array);
  • "Play effects on landing"
  • Play Effect(All Players(All Teams), Debuff Impact Sound, Red, Event Player, 100);
  • Play Effect(All Players(All Teams), Bad Explosion, Red, Event Player, 5);
  • Play Effect(All Players(All Teams), Ring Explosion, Red, Event Player, 5);
  • "Get all players in radius"
  • Set Player Variable(Event Player, PlayersInRadius, Filtered Array(All Living Players(All Teams), Compare(Distance Between(
  • Current Array Element, Event Player), <=, 5)));
  • "Remove event player from array"
  • Set Player Variable(Event Player, PlayersInRadius, Remove From Array(Player Variable(Event Player, PlayersInRadius),
  • Event Player));
  • "Loop through players in radius and damage them"
  • For Player Variable(Event Player, ShortLoop, 0, Count Of(Player Variable(Event Player, PlayersInRadius)), 1);
  • Apply Impulse(Value In Array(Player Variable(Event Player, PlayersInRadius), Player Variable(Event Player, ShortLoop)), Up, 5,
  • To Player, Incorporate Contrary Motion);
  • Apply Impulse(Value In Array(Player Variable(Event Player, PlayersInRadius), Player Variable(Event Player, ShortLoop)),
  • Direction Towards(Event Player, Value In Array(Player Variable(Event Player, PlayersInRadius), Player Variable(Event Player,
  • ShortLoop))), 15, To World, Incorporate Contrary Motion);
  • Wait(0.075, Ignore Condition);
  • Damage(Value In Array(Player Variable(Event Player, PlayersInRadius), Player Variable(Event Player, ShortLoop)), Event Player,
  • Global Variable(FlopperDamage));
  • End;
  • }
  • }
  • disabled rule("----- Changing Polarity ----- = 11")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • }
  • rule("Settings")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Or(Compare(Global Variable(CurrentRandomEffect), ==, 11), Array Contains(Global Variable(RandomnessIntensifiesArray), 11)) == True;
  • }
  • }
  • rule("Initialise")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Or(Compare(Global Variable(CurrentRandomEffect), ==, 11), Array Contains(Global Variable(RandomnessIntensifiesArray), 11)) == True;
  • }
  • actions
  • {
  • Create HUD Text(All Players(All Teams), Null, Custom String("Landing a melee attack will swap their Polarity", Null, Null, Null),
  • Null, Left, 0, White, White, White, Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Null, Custom String(
  • "Damaging someone of the opposit polarity will damage and stun you for a brief moment", Null, Null, Null), Null, Left, 0,
  • White, White, White, Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Null, Custom String("Everyone is given Positive or Negative polarity on spawning", Null,
  • Null, Null), Null, Left, 0, White, White, White, Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Custom String("Changing Polarity", Null, Null, Null), Null, Null, Left, 0, Yellow, White,
  • White, Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Null, Custom String(" ", Null, Null, Null), Null, Left, 0, White, White, White,
  • Visible To and String, Default Visibility);
  • }
  • }
  • rule("Give player random polarity")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Or(Compare(Global Variable(CurrentRandomEffect), ==, 11), Array Contains(Global Variable(RandomnessIntensifiesArray), 11)) == True;
  • Is Alive(Event Player) == True;
  • }
  • actions
  • {
  • Set Player Variable(Event Player, PositivePolarity, Random Value In Array(Global Variable(TrueFalseArray)));
  • }
  • }
  • rule("Player has positive polarity")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Or(Compare(Global Variable(CurrentRandomEffect), ==, 11), Array Contains(Global Variable(RandomnessIntensifiesArray), 11)) == True;
  • Player Variable(Event Player, PositivePolarity) == True;
  • }
  • actions
  • {
  • Destroy Effect(Player Variable(Event Player, PolarityEffect));
  • Destroy In-World Text(Player Variable(Event Player, PolarityIcon));
  • Destroy HUD Text(Player Variable(Event Player, PolarityHud));
  • Wait(0.050, Ignore Condition);
  • Create Effect(All Players(All Teams), Ring, Yellow, Event Player, 0.500, Visible To Position and Radius);
  • Set Player Variable(Event Player, PolarityEffect, Last Created Entity);
  • Create In-World Text(All Players(All Teams), Custom String("+", Null, Null, Null), Event Player, 2, Clip Against Surfaces,
  • Visible To Position and String, Yellow, Default Visibility);
  • Set Player Variable(Event Player, PolarityIcon, Last Text ID);
  • Create HUD Text(Event Player, Custom String("You are Positively charged", Null, Null, Null), Null, Null, Top, 0, Yellow, White,
  • White, Visible To and String, Default Visibility);
  • Set Player Variable(Event Player, PolarityHud, Last Text ID);
  • }
  • }
  • rule("Player has negative polarity")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Or(Compare(Global Variable(CurrentRandomEffect), ==, 11), Array Contains(Global Variable(RandomnessIntensifiesArray), 11)) == True;
  • Player Variable(Event Player, PositivePolarity) == False;
  • }
  • actions
  • {
  • Destroy Effect(Player Variable(Event Player, PolarityEffect));
  • Destroy In-World Text(Player Variable(Event Player, PolarityIcon));
  • Destroy HUD Text(Player Variable(Event Player, PolarityHud));
  • Wait(0.050, Ignore Condition);
  • Create Effect(All Players(All Teams), Ring, Blue, Event Player, 0.500, Visible To Position and Radius);
  • Set Player Variable(Event Player, PolarityEffect, Last Created Entity);
  • Create In-World Text(All Players(All Teams), Custom String("-", Null, Null, Null), Event Player, 2, Clip Against Surfaces,
  • Visible To Position and String, Blue, Default Visibility);
  • Set Player Variable(Event Player, PolarityIcon, Last Text ID);
  • Create HUD Text(Event Player, Custom String("You are Negatively charged", Null, Null, Null), Null, Null, Top, 0, Blue, White,
  • White, Visible To and String, Default Visibility);
  • Set Player Variable(Event Player, PolarityHud, Last Text ID);
  • }
  • }
  • rule("Player dealt damage")
  • {
  • event
  • {
  • Player Dealt Damage;
  • All;
  • All;
  • }
  • conditions
  • {
  • Or(Compare(Global Variable(CurrentRandomEffect), ==, 11), Array Contains(Global Variable(RandomnessIntensifiesArray), 11)) == True;
  • }
  • actions
  • {
  • If(Compare(Player Variable(Event Player, PositivePolarity), !=, Player Variable(Victim, PositivePolarity)));
  • Set Status(Event Player, Victim, Stunned, 1);
  • Damage(Event Player, Null, 50);
  • End;
  • }
  • }
  • rule("Player dealt melee damage")
  • {
  • event
  • {
  • Player Dealt Damage;
  • All;
  • All;
  • }
  • conditions
  • {
  • Or(Compare(Global Variable(CurrentRandomEffect), ==, 11), Array Contains(Global Variable(RandomnessIntensifiesArray), 11)) == True;
  • Distance Between(Event Player, Victim) <= 3;
  • Or(Compare(Event Damage, ==, 30), Compare(Event Damage, ==, 25)) == True;
  • }
  • actions
  • {
  • If(Compare(Player Variable(Victim, PositivePolarity), ==, True));
  • Set Player Variable(Victim, PositivePolarity, False);
  • Else;
  • Set Player Variable(Victim, PositivePolarity, True);
  • End;
  • }
  • }
  • disabled rule("----- Out of body experience ----- = 12")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • }
  • rule("Settings")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Or(Compare(Global Variable(CurrentRandomEffect), ==, 12), Array Contains(Global Variable(RandomnessIntensifiesArray), 12)) == True;
  • }
  • }
  • rule("Initialise")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Or(Compare(Global Variable(CurrentRandomEffect), ==, 12), Array Contains(Global Variable(RandomnessIntensifiesArray), 12)) == True;
  • }
  • actions
  • {
  • Create HUD Text(All Players(All Teams), Null, Custom String("Yes, it's janky", Null, Null, Null), Null, Left, 0, White, White,
  • White, Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Null, Custom String("You're stuck in Third Person", Null, Null, Null), Null, Left, 0,
  • White, White, White, Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Custom String("Out of body experience", Null, Null, Null), Null, Null, Left, 0, White,
  • White, White, Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Null, Custom String(" ", Null, Null, Null), Null, Left, 0, White, White, White,
  • Visible To and String, Default Visibility);
  • }
  • }
  • rule("Set Third Person")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Or(Compare(Global Variable(CurrentRandomEffect), ==, 12), Array Contains(Global Variable(RandomnessIntensifiesArray), 12)) == True;
  • Is Alive(Event Player) == True;
  • }
  • actions
  • {
  • Wait(0.250, Ignore Condition);
  • Start Camera(Event Player, Ray Cast Hit Position(Eye Position(Event Player), Add(Eye Position(Event Player), Add(World Vector Of(
  • Vector(-1, 0, 0), Event Player, Rotation), Multiply(Facing Direction Of(Event Player), -2.500))), All Players(All Teams),
  • Event Player, False), Ray Cast Hit Position(Eye Position(Event Player), Add(Eye Position(Event Player), Multiply(
  • Facing Direction Of(Event Player), 200)), All Players(All Teams), Event Player, False), 60);
  • }
  • }
  • disabled rule("----- Randomness Intensifies ----- = Last")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • }
  • rule("Settings")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Global Variable(CurrentRandomEffect) == Subtract(Global Variable(TotalAmountOfEffects), 1);
  • }
  • }
  • rule("Initialise")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Global Variable(CurrentRandomEffect) == Subtract(Global Variable(TotalAmountOfEffects), 1);
  • }
  • actions
  • {
  • "Build Randomness array, without Randomness Intensifies"
  • For Global Variable(Loop, 0, Subtract(Global Variable(TotalAmountOfEffects), 1), 1);
  • Set Global Variable At Index(ArrayForRandomat, Global Variable(Loop), Global Variable(Loop));
  • End;
  • Wait(0.050, Ignore Condition);
  • Create HUD Text(All Players(All Teams), Null, Custom String("3 Random effects are enabled at once! Good luck.", Null, Null, Null),
  • Null, Left, 0, White, White, White, Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Custom String("Randomness Intensifies", Null, Null, Null), Null, Null, Left, 0, Lime Green,
  • White, White, Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Null, Custom String(" ", Null, Null, Null), Null, Left, 0, White, White, White,
  • Visible To and String, Default Visibility);
  • }
  • }
  • rule("Pick 3 random events")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Global Variable(CurrentRandomEffect) == Subtract(Global Variable(TotalAmountOfEffects), 1);
  • }
  • actions
  • {
  • For Global Variable(Loop, 0, 3, 1);
  • Set Global Variable(RandomValue, Random Value In Array(Global Variable(ArrayForRandomat)));
  • Set Global Variable(ArrayForRandomat, Remove From Array(Global Variable(ArrayForRandomat), Global Variable(RandomValue)));
  • Set Global Variable At Index(RandomnessIntensifiesArray, Global Variable(Loop), Global Variable(RandomValue));
  • End;
  • Call Subroutine(MakeRandomnessArray);
  • }
  • }
Join the Workshop.codes Discord