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 Expanse Night
  • Workshop Island
  • Workshop Island Night
  • }
  • }
  • 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
  • 37: HUDTimer
  • 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
  • 3: CreateHUDTimer
  • }
  • 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, 45);
  • Global.RandomatTimer = 45;
  • "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);
  • Global.InfiniteGame = True;
  • }
  • }
  • rule("Infinite timer")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Match Time < 1800;
  • Global Variable(InfiniteGame) == True;
  • Global.InfiniteGame == True;
  • Is Game In Progress == True;
  • }
  • actions
  • {
  • Set Match Time(3599);
  • }
  • }
  • rule("Pre-game")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Is Assembling Heroes == True;
  • }
  • actions
  • {
  • Set Match Time(5);
  • }
  • }
  • rule("Disable default game ending")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Global Variable(InfiniteGame) == True;
  • Global.InfiniteGame == True;
  • }
  • actions
  • {
  • Disable Built-In Game Mode Completion;
  • Disable Built-In Game Mode Announcer;
  • Disable Built-In Game Mode Music;
  • }
  • }
  • rule("Subroutine - HUD Timer")
  • {
  • event
  • {
  • Subroutine;
  • CreateHUDTimer;
  • }
  • actions
  • {
  • Create HUD Text(All Players(All Teams), Null, Custom String("Read more at workshop.codes/randomat {0}", Icon String(Question Mark),
  • Null, Null), Null, Right, 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, 2, White, White, White,
  • Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Null, Custom String("Next Randomat in: {0}", Subtract(Global Variable(RandomatTimer),
  • Global Variable(HUDTimer)), Null, Null), Null, Right, 5, White, Orange, White, Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Null, Custom String("Read more at workshop.codes/randomat"), Null, Right, 0, White, White,
  • White, Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Null, Custom String(" "), Null, Left, 2, White, White, White, Visible To and String,
  • Default Visibility);
  • Create HUD Text(All Players(All Teams), Null, Custom String("Next Randomat in: {0}", Round To Integer(
  • Global.RandomatTimer - Global.HUDTimer, Up)), Null, Right, 5, White, Orange, White, Visible To and String, Default Visibility);
  • "Timer on HUD that counts down"
  • Set Global Variable(HUDTimer, 0);
  • Global.HUDTimer = 0;
  • "Chase Timer HUD"
  • Chase Global Variable At Rate(HUDTimer, Global Variable(RandomatTimer), 1, Destination and Rate);
  • Chase Global Variable At Rate(HUDTimer, Global.RandomatTimer, 1, Destination and Rate);
  • }
  • }
  • 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));
  • For Global Variable(Loop, 0, Global.TotalAmountOfEffects, 1);
  • Global.ArrayForRandomat[Global.Loop] = Global.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);
  • 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, 14);
  • Set Global Variable(MomentumMultiplier, False);
  • Global.CurrentRandomEffect = 1000;
  • Global.RandomnessIntensifiesArray = Empty Array;
  • Global.NewEventStarted = False;
  • Global.TotalAmountOfEffects = 14;
  • Global.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);
  • Global.TrueFalseArray[0] = True;
  • Global.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));
  • Small Message(All Players(All Teams), Custom String("New Randomat incoming..."));
  • Wait(1, Ignore Condition);
  • Small Message(All Players(All Teams), Custom String("3...", Null, Null, Null));
  • Small Message(All Players(All Teams), Custom String("3..."));
  • Wait(1, Ignore Condition);
  • Small Message(All Players(All Teams), Custom String("2...", Null, Null, Null));
  • Small Message(All Players(All Teams), Custom String("2..."));
  • Wait(1, Ignore Condition);
  • Small Message(All Players(All Teams), Custom String("1...", Null, Null, Null));
  • Set Global Variable(MomentumMultiplier, True);
  • Small Message(All Players(All Teams), Custom String("1..."));
  • Global.MomentumMultiplier = True;
  • Wait(1, Ignore Condition);
  • "Reset all values and effects"
  • Set Global Variable(CurrentRandomEffect, 1000);
  • Set Global Variable(RandomnessIntensifiesArray, Empty Array);
  • Global.CurrentRandomEffect = 1000;
  • Global.RandomnessIntensifiesArray = Empty Array;
  • Destroy All HUD Text;
  • Destroy All Icons;
  • Destroy All In-World Text;
  • Destroy All Effects;
  • Set Global Variable(NewEventStarted, True);
  • Global.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, 1, White, Turquoise,
  • White, Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Null, String("{0} {1} {2}", Custom String("A new Random effect will occur every"),
  • Global.RandomatTimer, Custom String("seconds")), Null, Right, 1, White, Turquoise, White, Visible To and String,
  • Default Visibility);
  • Wait(0.250, Ignore Condition);
  • Set Global Variable(MomentumMultiplier, False);
  • Global.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)));
  • Global.CurrentRandomEffect = Random Value In Array(Global.ArrayForRandomat);
  • Global.ArrayForRandomat = Remove From Array(Global.ArrayForRandomat, Global.CurrentRandomEffect);
  • "Re-create HUD"
  • Create HUD Text(All Players(All Teams), Null, Custom String("{0} Current Randomat", Icon String(Recycle), Null, Null), Null, Left,
  • -2, White, Blue, Blue, Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Null, Custom String("{0} Current Randomat", Icon String(Recycle)), Null, Left, -2, White,
  • Blue, Blue, Visible To and String, Default Visibility);
  • Call Subroutine(CreateHUDTimer);
  • Wait(Subtract(Global Variable(RandomatTimer), 4), Ignore Condition);
  • Wait(Global.RandomatTimer - 4, Ignore Condition);
  • Loop;
  • }
  • }
  • rule("New event starts - Player event")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Global Variable(NewEventStarted) == True;
  • Global.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);
  • Event Player.HasDied = False;
  • 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);
  • Big Message(Event Player, Custom String("Randomat!"));
  • Global.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));
  • Create Dummy Bot(Random Value In Array(All Heroes), Opposite Team Of(Team Of(Event Player)), -1,
  • Event Player + 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, 0);
  • Global.RandomnessIntensifiesArray[0] = 0;
  • }
  • }
  • 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;
  • (Global.CurrentRandomEffect == 0 || Array Contains(Global.RandomnessIntensifiesArray, 0)) == True;
  • }
  • actions
  • {
  • "Change this number to adjust the frequency of Swaps"
  • Set Global Variable(Interval, 5);
  • Global.Interval = 5;
  • }
  • }
  • rule("Initialise")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Or(Compare(Global Variable(CurrentRandomEffect), ==, 0), Array Contains(Global Variable(RandomnessIntensifiesArray), 0)) == True;
  • (Global.CurrentRandomEffect == 0 || Array Contains(Global.RandomnessIntensifiesArray, 0)) == True;
  • }
  • actions
  • {
  • Set Global Variable(Timer, Global Variable(Interval));
  • Wait(0.016, Ignore Condition);
  • 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);
  • Global.Timer = Global.Interval;
  • Wait(0.016, Ignore Condition);
  • Create HUD Text(All Players(All Teams), Custom String("{0} Swap!", Icon String(Dizzy), Null, Null), Null, Null, Left, 0, Yellow,
  • White, White, Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Null, String("{0} {1} {2}", Custom String("Every"), Global.Interval, Custom String(
  • "seconds 2 random players will swap position.")), Null, Left, 0, White, White, White, Visible To and String,
  • Default Visibility);
  • Wait(0.016, Ignore Condition);
  • Create HUD Text(All Players(All Teams), Null, Custom String(" ", Null, Null, Null), Null, Left, 0, White, White, White,
  • Create HUD Text(All Players(All Teams), Custom String("{0} Swap!", Icon String(Dizzy)), Null, Null, Left, 0, Yellow, White, White,
  • Visible To and String, Default Visibility);
  • Wait(0.016, Ignore Condition);
  • Create HUD Text(All Players(All Teams), Null, Custom String(" "), 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);
  • (Global.CurrentRandomEffect == 0 || Array Contains(Global.RandomnessIntensifiesArray, 0)) == True;
  • Global.Timer == Global.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;
  • (Global.CurrentRandomEffect == 0 || Array Contains(Global.RandomnessIntensifiesArray, 0)) == True;
  • Global.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));
  • Global.Player1 = Random Value In Array(All Living Players(All Teams));
  • Global.Player2 = Random Value In Array(Remove From Array(All Living Players(All Teams), Global.Player1));
  • Global.PositionPlayer1 = Position Of(Global.Player1);
  • Global.PositionPlayer2 = Position Of(Global.Player2);
  • Global.FacingPlayer1 = Facing Direction Of(Global.Player1);
  • Global.FacingPlayer2 = Facing Direction Of(Global.Player2);
  • Skip If(Global.PositionPlayer1 == 0 || Global.PositionPlayer2 == 0, 11);
  • Big Message(All Players(All Teams), Custom String("Swap!"));
  • Teleport(Global.Player1, Global.PositionPlayer2);
  • Set Facing(Global.Player1, Global.FacingPlayer2, To World);
  • Teleport(Global.Player2, Global.PositionPlayer1);
  • Set Facing(Global.Player2, Global.FacingPlayer1, To World);
  • Play Effect(All Players(All Teams), Good Pickup Effect, Yellow, Global.Player1, 1);
  • Play Effect(All Players(All Teams), Ring Explosion, Yellow, Global.Player1, 2);
  • Play Effect(All Players(All Teams), Buff Explosion Sound, Yellow, Global.Player1, 50);
  • Play Effect(All Players(All Teams), Good Pickup Effect, Yellow, Global.Player2, 1);
  • Play Effect(All Players(All Teams), Ring Explosion, Yellow, Global.Player2, 2);
  • Play Effect(All Players(All Teams), Buff Explosion Sound, Yellow, Global.Player2, 50);
  • Global.Timer = Global.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;
  • (Global.CurrentRandomEffect == 1 || Array Contains(Global.RandomnessIntensifiesArray, 1)) == True;
  • }
  • actions
  • {
  • "Change me to adjust the radius of the contagion dropped by dead bodies"
  • Set Global Variable(Radius, 5);
  • Global.Radius = 5;
  • "Change me to adjust the damage dealt per second when inside a Contagion blob"
  • Set Global Variable(DamageDealt, 100);
  • Global.DamageDealt = 100;
  • }
  • }
  • rule("Initialise")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Or(Compare(Global Variable(CurrentRandomEffect), ==, 1), Array Contains(Global Variable(RandomnessIntensifiesArray), 1)) == True;
  • (Global.CurrentRandomEffect == 1 || Array Contains(Global.RandomnessIntensifiesArray, 1)) == True;
  • }
  • actions
  • {
  • Set Global Variable(PositionsArray, Empty Array);
  • Global.PositionsArray = Empty Array;
  • Wait(0.016, Ignore Condition);
  • 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, 1, White, White,
  • White, Visible To and String, Default Visibility);
  • "Dead bodies leave behind a puddle that deals a large amount of damage"), Null, Left, 1, White, White, White,
  • Visible To and String, Default Visibility);
  • Wait(0.016, Ignore Condition);
  • Create HUD Text(All Players(All Teams), Custom String("{0} Contagious Bodies", Icon String(Poison 2), Null, Null), Null, Null,
  • Left, 1, Purple, White, White, Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Custom String("{0} Contagious Bodies", Icon String(Poison 2)), Null, Null, Left, 1, Purple,
  • White, White, Visible To and String, Default Visibility);
  • Wait(0.016, Ignore Condition);
  • Create HUD Text(All Players(All Teams), Null, Custom String(" ", Null, Null, Null), Null, Left, 1, White, White, White,
  • Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Null, Custom String(" "), Null, Left, 1, 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;
  • (Global.CurrentRandomEffect == 1 || Array Contains(Global.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)));
  • Global.CurrentPosition = Position Of(Event Player);
  • Global.PositionsArray = Append To Array(Global.PositionsArray, Global.CurrentPosition);
  • "Create ring effect"
  • Create Effect(All Players(All Teams), Ring, Purple, Global Variable(CurrentPosition), Global Variable(Radius), None);
  • Create Effect(All Players(All Teams), Ring, Purple, Global.CurrentPosition, Global.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 Effect(All Players(All Teams), Cloud, Purple, Vector(X Component Of(Position Of(Event Player)), Y Component Of(Position Of(
  • Event Player)) - Global.Radius / 8, Z Component Of(Position Of(Event Player))), Global.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);
  • Create Effect(All Players(All Teams), Sparkles, Purple, Vector(X Component Of(Position Of(Event Player)), Y Component Of(
  • Position Of(Event Player)) - Global.Radius / 4, Z Component Of(Position Of(Event Player))), Global.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;
  • (Global.CurrentRandomEffect == 1 || Array Contains(Global.RandomnessIntensifiesArray, 1)) == True;
  • Has Spawned(Event Player) == True;
  • Is Alive(Event Player) == True;
  • }
  • actions
  • {
  • Set Player Variable(Event Player, SpawnTimer, 0);
  • 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;
  • (Global.CurrentRandomEffect == 1 || Array Contains(Global.RandomnessIntensifiesArray, 1)) == True;
  • Is True For Any(Global.PositionsArray, Distance Between(Current Array Element, Event Player) <= Global.Radius) == True;
  • (Event Player.SpawnTimer >= 2) == True;
  • }
  • actions
  • {
  • Damage(Event Player, Null, Divide(Global Variable(DamageDealt), 4));
  • Damage(Event Player, Null, Global.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;
  • (Global.CurrentRandomEffect == 2 || Array Contains(Global.RandomnessIntensifiesArray, 2)) == True;
  • }
  • }
  • rule("Initialise")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Or(Compare(Global Variable(CurrentRandomEffect), ==, 2), Array Contains(Global Variable(RandomnessIntensifiesArray), 2)) == True;
  • (Global.CurrentRandomEffect == 2 || Array Contains(Global.RandomnessIntensifiesArray, 2)) == True;
  • }
  • actions
  • {
  • Wait(0.016, Ignore Condition);
  • Create HUD Text(All Players(All Teams), Null, Custom String("You can't stop walking forward!", Null, Null, Null), Null, Left, 2,
  • White, White, White, Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Null, Custom String("You can't stop walking forward!"), Null, Left, 2, White, White, White,
  • Visible To and String, Default Visibility);
  • Wait(0.016, Ignore Condition);
  • Create HUD Text(All Players(All Teams), Custom String("{0} Can't stop, Won't stop", Icon String(Exclamation Mark), Null, Null),
  • Null, Null, Left, 2, Green, White, White, Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Custom String("{0} Can't stop, Won't stop", Icon String(Exclamation Mark)), Null, Null,
  • Left, 2, Green, White, White, Visible To and String, Default Visibility);
  • Wait(0.016, Ignore Condition);
  • Create HUD Text(All Players(All Teams), Null, Custom String(" ", Null, Null, Null), Null, Left, 2, White, White, White,
  • Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Null, Custom String(" "), Null, Left, 2, 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;
  • (Global.CurrentRandomEffect == 2 || Array Contains(Global.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;
  • (Global.CurrentRandomEffect == 3 || Array Contains(Global.RandomnessIntensifiesArray, 3)) == True;
  • }
  • }
  • rule("Initialise")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Or(Compare(Global Variable(CurrentRandomEffect), ==, 3), Array Contains(Global Variable(RandomnessIntensifiesArray), 3)) == True;
  • (Global.CurrentRandomEffect == 3 || Array Contains(Global.RandomnessIntensifiesArray, 3)) == True;
  • }
  • actions
  • {
  • Wait(0.016, Ignore Condition);
  • Create HUD Text(All Players(All Teams), Null, Custom String("Can't jump, and gravity is heavily increased.", Null, Null, Null),
  • Null, Left, 3, White, White, White, Visible To and String, Default Visibility);
  • Wait(0.016, Ignore Condition);
  • Create HUD Text(All Players(All Teams), Custom String("{0} Stay down!", Icon String(Stop), Null, Null), Null, Null, Left, 3, White,
  • Create HUD Text(All Players(All Teams), Null, Custom String("Can't jump, and gravity is heavily increased"), Null, Left, 3, White,
  • White, White, Visible To and String, Default Visibility);
  • Wait(0.016, Ignore Condition);
  • Create HUD Text(All Players(All Teams), Null, Custom String(" ", Null, Null, Null), Null, Left, 3, White, White, White,
  • Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Custom String("{0} Stay down!", Icon String(Stop)), Null, Null, Left, 3, White, White,
  • White, Visible To and String, Default Visibility);
  • Wait(0.016, Ignore Condition);
  • Create HUD Text(All Players(All Teams), Null, Custom String(" "), Null, Left, 3, 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;
  • (Global.CurrentRandomEffect == 3 || Array Contains(Global.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;
  • (Global.CurrentRandomEffect == 3 || Array Contains(Global.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;
  • (Global.CurrentRandomEffect == 4 || Array Contains(Global.RandomnessIntensifiesArray, 4)) == True;
  • }
  • }
  • rule("Initialise")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Or(Compare(Global Variable(CurrentRandomEffect), ==, 4), Array Contains(Global Variable(RandomnessIntensifiesArray), 4)) == True;
  • (Global.CurrentRandomEffect == 4 || Array Contains(Global.RandomnessIntensifiesArray, 4)) == True;
  • }
  • actions
  • {
  • Wait(0.016, Ignore Condition);
  • 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, 4, White, White, White, Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Null, Custom String("Everyone is invisible but can be found by their hero icon"), Null,
  • Left, 4, White, White, White, Visible To and String, Default Visibility);
  • Wait(0.016, Ignore Condition);
  • Create HUD Text(All Players(All Teams), Custom String("{0} Hard of seeing", Icon String(Eye), Null, Null), Null, Null, Left, 4,
  • Turquoise, White, White, Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Custom String("{0} Hard of seeing", Icon String(Eye)), Null, Null, Left, 4, Turquoise,
  • White, White, Visible To and String, Default Visibility);
  • Wait(0.016, Ignore Condition);
  • Create HUD Text(All Players(All Teams), Null, Custom String(" ", Null, Null, Null), Null, Left, 4, White, White, White,
  • Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Null, Custom String(" "), Null, Left, 4, 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;
  • (Global.CurrentRandomEffect == 4 || Array Contains(Global.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;
  • (Global.CurrentRandomEffect == 5 || Array Contains(Global.RandomnessIntensifiesArray, 5)) == True;
  • }
  • }
  • rule("Initialise")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Or(Compare(Global Variable(CurrentRandomEffect), ==, 5), Array Contains(Global Variable(RandomnessIntensifiesArray), 5)) == True;
  • (Global.CurrentRandomEffect == 5 || Array Contains(Global.RandomnessIntensifiesArray, 5)) == True;
  • }
  • actions
  • {
  • Wait(0.016, Ignore Condition);
  • 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, 5, White, White, White, Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Null, Custom String("When respawning you spawn right on top of someone else"), Null, Left,
  • 5, White, White, White, Visible To and String, Default Visibility);
  • Wait(0.016, Ignore Condition);
  • Create HUD Text(All Players(All Teams), Custom String("{0} This could get messy", Icon String(Skull), Null, Null), Null, Null,
  • Left, 5, Red, White, White, Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Custom String("{0} This could get messy", Icon String(Skull)), Null, Null, Left, 5, Red,
  • White, White, Visible To and String, Default Visibility);
  • Wait(0.016, Ignore Condition);
  • Create HUD Text(All Players(All Teams), Null, Custom String(" ", Null, Null, Null), Null, Left, 5, White, White, White,
  • Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Null, Custom String(" "), Null, Left, 5, 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;
  • (Global.CurrentRandomEffect == 5 || Array Contains(Global.RandomnessIntensifiesArray, 5)) == True;
  • }
  • actions
  • {
  • Set Player Variable(Event Player, HasDied, True);
  • 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;
  • (Global.CurrentRandomEffect == 5 || Array Contains(Global.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;
  • 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))))));
  • 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(Event Player.RandomPlayer)), Y Component Of(
  • Position Of(Event Player.RandomPlayer) + 0.500), Z Component Of(Position Of(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;
  • (Global.CurrentRandomEffect == 6 || Array Contains(Global.RandomnessIntensifiesArray, 6)) == True;
  • }
  • actions
  • {
  • "Change me to adjust the initial radius of the Resource"
  • Set Global Variable(JumpHeight, 10);
  • Global.JumpHeight = 10;
  • }
  • }
  • rule("Initialise")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Or(Compare(Global Variable(CurrentRandomEffect), ==, 6), Array Contains(Global Variable(RandomnessIntensifiesArray), 6)) == True;
  • (Global.CurrentRandomEffect == 6 || Array Contains(Global.RandomnessIntensifiesArray, 6)) == True;
  • }
  • actions
  • {
  • Wait(0.016, Ignore Condition);
  • Create HUD Text(All Players(All Teams), Null, Custom String("You can't stop bouncing!", Null, Null, Null), Null, Left, 6, Sky Blue,
  • White, White, Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Null, Custom String("You can't stop bouncing!"), Null, Left, 6, Sky Blue, White, White,
  • Visible To and String, Default Visibility);
  • Wait(0.016, Ignore Condition);
  • Create HUD Text(All Players(All Teams), Custom String("{0} I don't do 'bouncy'", Icon String(Arrow: Up), Null, Null), Null, Null,
  • Left, 6, Aqua, White, White, Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Custom String("{0} I don't do 'bouncy'", Icon String(Arrow: Up)), Null, Null, Left, 6,
  • Aqua, White, White, Visible To and String, Default Visibility);
  • Wait(0.016, Ignore Condition);
  • Create HUD Text(All Players(All Teams), Null, Custom String(" ", Null, Null, Null), Null, Left, 6, White, White, White,
  • Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Null, Custom String(" "), Null, Left, 6, 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;
  • (Global.CurrentRandomEffect == 6 || Array Contains(Global.RandomnessIntensifiesArray, 6)) == True;
  • Is On Ground(Event Player) == True;
  • }
  • actions
  • {
  • Apply Impulse(Event Player, Up, Global Variable(JumpHeight), To Player, Incorporate Contrary Motion);
  • Apply Impulse(Event Player, Up, Global.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;
  • (Global.CurrentRandomEffect == 7 || Array Contains(Global.RandomnessIntensifiesArray, 7)) == True;
  • }
  • actions
  • {
  • "Change me to adjust how much damage is dealt when hitting the floor. Higher = more."
  • Set Global Variable(DamageDealt, 12);
  • Global.DamageDealt = 12;
  • }
  • }
  • rule("Initialise")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Or(Compare(Global Variable(CurrentRandomEffect), ==, 7), Array Contains(Global Variable(RandomnessIntensifiesArray), 7)) == True;
  • (Global.CurrentRandomEffect == 7 || Array Contains(Global.RandomnessIntensifiesArray, 7)) == True;
  • }
  • actions
  • {
  • Wait(0.016, Ignore Condition);
  • 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, 7, Sky Blue,
  • White, White, Visible To and String, Default Visibility);
  • "Fall damage is enabled! Kill credit goes to those who last hit the target"), Null, Left, 7, Sky Blue, White, White,
  • Visible To and String, Default Visibility);
  • Wait(0.016, Ignore Condition);
  • Create HUD Text(All Players(All Teams), Custom String("{0} Fear of heights", Icon String(Warning), Null, Null), Null, Null, Left,
  • 7, Sky Blue, White, White, Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Custom String("{0} Fear of heights", Icon String(Warning)), Null, Null, Left, 7, Sky Blue,
  • White, White, Visible To and String, Default Visibility);
  • Wait(0.016, Ignore Condition);
  • Create HUD Text(All Players(All Teams), Null, Custom String(" ", Null, Null, Null), Null, Left, 7, White, White, White,
  • Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Null, Custom String(" "), Null, Left, 7, 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;
  • (Global.CurrentRandomEffect == 7 || Array Contains(Global.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));
  • 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;
  • (Global.CurrentRandomEffect == 7 || Array Contains(Global.RandomnessIntensifiesArray, 7)) == True;
  • Is On Ground(Event Player) == True;
  • Player Variable(Event Player, FallSpeed) < -10;
  • 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));
  • Event Player.DamageToBeDone = Event Player.FallSpeed * Global.DamageDealt * -1;
  • Damage(Event Player, Event Player.LastDamagedBy, 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;
  • (Global.CurrentRandomEffect == 7 || Array Contains(Global.RandomnessIntensifiesArray, 7)) == True;
  • }
  • actions
  • {
  • Set Player Variable(Event Player, LastDamagedBy, Attacker);
  • 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;
  • (Global.CurrentRandomEffect == 7 || Array Contains(Global.RandomnessIntensifiesArray, 7)) == True;
  • Health(Event Player) == Max Health(Event Player);
  • }
  • actions
  • {
  • Set Player Variable(Event Player, LastDamagedBy, Null);
  • 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;
  • (Global.CurrentRandomEffect == 8 || Array Contains(Global.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);
  • Global.MaxCoins = 100;
  • }
  • }
  • rule("Initialise")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Or(Compare(Global Variable(CurrentRandomEffect), ==, 8), Array Contains(Global Variable(RandomnessIntensifiesArray), 8)) == True;
  • (Global.CurrentRandomEffect == 8 || Array Contains(Global.RandomnessIntensifiesArray, 8)) == True;
  • }
  • actions
  • {
  • Set Global Variable(AllCoinPositions, Empty Array);
  • Set Global Variable(CoinEffectsArray, Empty Array);
  • Global.AllCoinPositions = Empty Array;
  • Global.CoinEffectsArray = Empty Array;
  • Wait(0.016, Ignore Condition);
  • 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, 8,
  • White, White, White, Visible To and String, Default Visibility);
  • "The player with the most coins at the end of the round gets +5 added to their Kill score"), Null, Left, 8, White, White,
  • White, Visible To and String, Default Visibility);
  • Wait(0.016, Ignore Condition);
  • 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, 8,
  • White, White, White, Visible To and String, Default Visibility);
  • "Pick up the coins dropped all over the map. Getting killed will drop half your coins."), Null, Left, 8, White, White, White,
  • Visible To and String, Default Visibility);
  • Wait(0.016, Ignore Condition);
  • Create HUD Text(All Players(All Teams), Custom String("{0} Bounty Hunter", Icon String(Ring Thick), Null, Null), Null, Null, Left,
  • 8, Orange, White, White, Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Custom String("{0} Bounty Hunter", Icon String(Ring Thick)), Null, Null, Left, 8, Orange,
  • White, White, Visible To and String, Default Visibility);
  • Wait(0.016, Ignore Condition);
  • Create HUD Text(All Players(All Teams), Null, Custom String(" ", Null, Null, Null), Null, Left, 8, White, White, White,
  • Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Null, Custom String(" "), Null, Left, 8, 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;
  • (Global.CurrentRandomEffect == 8 || Array Contains(Global.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);
  • Event Player.AmountOfCoinsToDrop = 0;
  • Event Player.PlayerCoinLoop = 0;
  • Event Player.AmountOfCollectedCoins = 0;
  • Create HUD Text(Event Player, String("{0}: {1}", Custom String("Coins Collected"), Event Player.AmountOfCollectedCoins), Null,
  • Null, Top, 0, Orange, White, White, Visible To and String, Default Visibility);
  • Create In-World Text(All Players(All Teams), 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))));
  • Global.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))));
  • Global.PositionOfCurrentCoin = Vector(X Component Of(Global.PositionOfCurrentCoin) + Random Real(-20, 20), Y Component Of(
  • Global.PositionOfCurrentCoin) + 0.500, Z Component Of(Global.PositionOfCurrentCoin) + Random Real(-20, 20));
  • "Get nearest walkable position"
  • Set Global Variable(PositionOfCurrentCoin, Nearest Walkable Position(Global Variable(PositionOfCurrentCoin)));
  • Global.PositionOfCurrentCoin = Nearest Walkable Position(Global.PositionOfCurrentCoin);
  • "Set position in array"
  • Set Global Variable At Index(AllCoinPositions, Global Variable(CoinLoop), Global Variable(PositionOfCurrentCoin));
  • Global.AllCoinPositions[Global.CoinLoop] = Global.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);
  • Create Effect(All Players(All Teams), Sphere, Orange, Global.AllCoinPositions[Global.CoinLoop], 0.250, None);
  • Global.CoinEffectsArray[Global.CoinLoop] = Last Created Entity;
  • }
  • }
  • rule("Spawn Coins")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Or(Compare(Global Variable(CurrentRandomEffect), ==, 8), Array Contains(Global Variable(RandomnessIntensifiesArray), 8)) == True;
  • (Global.CurrentRandomEffect == 8 || Array Contains(Global.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);
  • For Global Variable(CoinLoop, 0, Global.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;
  • (Global.CurrentRandomEffect == 8 || Array Contains(Global.RandomnessIntensifiesArray, 8)) == True;
  • Is True For Any(Global.AllCoinPositions, 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)));
  • For Player Variable(Event Player, PlayerCoinLoop, 0, Count Of(Global.AllCoinPositions), 1);
  • If(Distance Between(Global.AllCoinPositions[Event Player.PlayerCoinLoop], Event Player) <= 1);
  • Global.AllCoinPositions[Event Player.PlayerCoinLoop] = Vector(0, 0, 0);
  • Event Player.AmountOfCollectedCoins += 1;
  • Destroy Effect(Global.CoinEffectsArray[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;
  • (Global.CurrentRandomEffect == 8 || Array Contains(Global.RandomnessIntensifiesArray, 8)) == True;
  • 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));
  • Event Player.AmountOfCoinsToDrop = Round To Integer(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)));
  • Event Player.AmountOfCollectedCoins = Event Player.AmountOfCollectedCoins - 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);
  • For Player Variable(Event Player, DroppedCoinLoop, 1, Event Player.AmountOfCoinsToDrop, 1);
  • Global.CoinLoop += 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))));
  • Global.PositionOfCurrentCoin = Vector(X Component Of(Position Of(Event Player)) + Random Real(-3, 3), Y Component Of(Position Of(
  • Event Player)) + 0.500, 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)));
  • Global.PositionOfCurrentCoin = Nearest Walkable Position(Global.PositionOfCurrentCoin);
  • "Set position in array"
  • Set Global Variable At Index(AllCoinPositions, Global Variable(CoinLoop), Global Variable(PositionOfCurrentCoin));
  • Global.AllCoinPositions[Global.CoinLoop] = Global.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);
  • Create Effect(All Players(All Teams), Sphere, Orange, Global.AllCoinPositions[Global.CoinLoop], 0.250, None);
  • Global.CoinEffectsArray[Global.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;
  • (Global.CurrentRandomEffect == 8 || Array Contains(Global.RandomnessIntensifiesArray, 8)) == True;
  • Global.MomentumMultiplier == True;
  • }
  • actions
  • {
  • Modify Player Score(Last Of(Sorted Array(All Players(All Teams), Player Variable(Current Array Element, AmountOfCollectedCoins))),
  • 5);
  • Modify Player Score(Last Of(Sorted Array(All Players(All Teams), 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;
  • (Global.CurrentRandomEffect == 9 || Array Contains(Global.RandomnessIntensifiesArray, 9)) == True;
  • }
  • actions
  • {
  • "Change me to adjust how for people go flying"
  • Set Global Variable(MomentumMultiplier, 2);
  • Global.MomentumMultiplier = 2;
  • }
  • }
  • rule("Initialise")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Or(Compare(Global Variable(CurrentRandomEffect), ==, 9), Array Contains(Global Variable(RandomnessIntensifiesArray), 9)) == True;
  • (Global.CurrentRandomEffect == 9 || Array Contains(Global.RandomnessIntensifiesArray, 9)) == True;
  • }
  • actions
  • {
  • Wait(0.016, Ignore Condition);
  • Create HUD Text(All Players(All Teams), Null, Custom String("The more damage you deal, the further they fly.", Null, Null, Null),
  • Null, Left, 9, White, White, White, Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Null, Custom String("The more damage you deal, the further they fly"), Null, Left, 9,
  • White, White, White, Visible To and String, Default Visibility);
  • Wait(0.016, Ignore Condition);
  • Create HUD Text(All Players(All Teams), Null, Custom String("Damaging someone pushes them back away from you.", Null, Null, Null),
  • Null, Left, 9, 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, Left, 9,
  • White, White, White, Visible To and String, Default Visibility);
  • Wait(0.016, Ignore Condition);
  • Create HUD Text(All Players(All Teams), Custom String("{0} Send 'em flying!", Icon String(Asterisk), Null, Null), Null, Null, Left,
  • 9, Blue, White, White, Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Custom String("{0} Send 'em flying!", Icon String(Asterisk)), Null, Null, Left, 9, Blue,
  • White, White, Visible To and String, Default Visibility);
  • Wait(0.016, Ignore Condition);
  • Create HUD Text(All Players(All Teams), Null, Custom String(" ", Null, Null, Null), Null, Left, 9, White, White, White,
  • Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Null, Custom String(" "), Null, Left, 9, 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;
  • (Global.CurrentRandomEffect == 9 || Array Contains(Global.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);
  • Skip If(Event Damage < 10, 3);
  • Apply Impulse(Event Player, Up, Event Damage * Global.MomentumMultiplier * 0.050, To Player, Incorporate Contrary Motion);
  • Apply Impulse(Event Player, Direction Towards(Attacker, Event Player),
  • Event Damage * Global.MomentumMultiplier * 0.050 * Global.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;
  • (Global.CurrentRandomEffect == 10 || Array Contains(Global.RandomnessIntensifiesArray, 10)) == True;
  • }
  • actions
  • {
  • "Change me to adjust how much damage is dealt when hitting the floor. Higher = more."
  • Set Global Variable(FlopperDamage, 250);
  • Global.FlopperDamage = 250;
  • }
  • }
  • rule("Initialise")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Or(Compare(Global Variable(CurrentRandomEffect), ==, 10), Array Contains(Global Variable(RandomnessIntensifiesArray), 10)) == True;
  • (Global.CurrentRandomEffect == 10 || Array Contains(Global.RandomnessIntensifiesArray, 10)) == True;
  • }
  • actions
  • {
  • Wait(0.016, Ignore Condition);
  • 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, 10, White, White, White, Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Null, Custom String("Dealing a large amount of damage to those around you"), Null, Left,
  • 10, White, White, White, Visible To and String, Default Visibility);
  • Wait(0.016, Ignore Condition);
  • 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, 10, 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,
  • Left, 10, White, White, White, Visible To and String, Default Visibility);
  • Wait(0.016, Ignore Condition);
  • Create HUD Text(All Players(All Teams), Custom String("{0} PHD Flopper", Icon String(Fire), Null, Null), Null, Null, Left, 10, Red,
  • White, White, Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Custom String("{0} PHD Flopper", Icon String(Fire)), Null, Null, Left, 10, Red, White,
  • White, Visible To and String, Default Visibility);
  • Wait(0.016, Ignore Condition);
  • Create HUD Text(All Players(All Teams), Null, Custom String(" ", Null, Null, Null), Null, Left, 10, White, White, White,
  • Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Null, Custom String(" "), Null, Left, 10, 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;
  • (Global.CurrentRandomEffect == 10 || Array Contains(Global.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));
  • 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;
  • (Global.CurrentRandomEffect == 10 || Array Contains(Global.RandomnessIntensifiesArray, 10)) == True;
  • Is On Ground(Event Player) == True;
  • Player Variable(Event Player, FallSpeed) < -15;
  • Event Player.FallSpeed < -15;
  • }
  • actions
  • {
  • Set Player Variable(Event Player, PlayersInRadius, Empty Array);
  • 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)));
  • Event Player.PlayersInRadius = Filtered Array(All Living Players(All Teams), 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));
  • Event Player.PlayersInRadius = Remove From Array(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);
  • For Player Variable(Event Player, ShortLoop, 0, Count Of(Event Player.PlayersInRadius), 1);
  • Apply Impulse(Event Player.PlayersInRadius[Event Player.ShortLoop], Up, 5, To Player, Incorporate Contrary Motion);
  • Apply Impulse(Event Player.PlayersInRadius[Event Player.ShortLoop], Direction Towards(Event Player,
  • Event Player.PlayersInRadius[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));
  • Damage(Event Player.PlayersInRadius[Event Player.ShortLoop], Event Player, Global.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;
  • (Global.CurrentRandomEffect == 11 || Array Contains(Global.RandomnessIntensifiesArray, 11)) == True;
  • }
  • }
  • rule("Initialise")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Or(Compare(Global Variable(CurrentRandomEffect), ==, 11), Array Contains(Global Variable(RandomnessIntensifiesArray), 11)) == True;
  • (Global.CurrentRandomEffect == 11 || Array Contains(Global.RandomnessIntensifiesArray, 11)) == True;
  • }
  • actions
  • {
  • Wait(0.016, Ignore Condition);
  • Create HUD Text(All Players(All Teams), Null, Custom String("Landing a melee attack will swap their Polarity", Null, Null, Null),
  • Null, Left, 11, White, White, White, Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Null, Custom String("Landing a melee attack will swap their Polarity"), Null, Left, 11,
  • White, White, White, Visible To and String, Default Visibility);
  • Wait(0.016, Ignore Condition);
  • 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, 11,
  • White, White, White, Visible To and String, Default Visibility);
  • "Damaging someone of the opposit polarity will damage and stun you for a brief moment"), Null, Left, 11, White, White, White,
  • Visible To and String, Default Visibility);
  • Wait(0.016, Ignore Condition);
  • Create HUD Text(All Players(All Teams), Null, Custom String("Everyone is given Positive or Negative polarity on spawning", Null,
  • Null, Null), Null, Left, 11, 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,
  • Left, 11, White, White, White, Visible To and String, Default Visibility);
  • Wait(0.016, Ignore Condition);
  • Create HUD Text(All Players(All Teams), Custom String("{0} Changing Polarity", Icon String(Bolt), Null, Null), Null, Null, Left,
  • 11, Yellow, White, White, Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Custom String("{0} Changing Polarity", Icon String(Bolt)), Null, Null, Left, 11, Yellow,
  • White, White, Visible To and String, Default Visibility);
  • Wait(0.016, Ignore Condition);
  • Create HUD Text(All Players(All Teams), Null, Custom String(" ", Null, Null, Null), Null, Left, 11, White, White, White,
  • Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Null, Custom String(" "), Null, Left, 11, 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;
  • (Global.CurrentRandomEffect == 11 || Array Contains(Global.RandomnessIntensifiesArray, 11)) == True;
  • Is Alive(Event Player) == True;
  • }
  • actions
  • {
  • Set Player Variable(Event Player, PositivePolarity, Random Value In Array(Global Variable(TrueFalseArray)));
  • Event Player.PositivePolarity = Random Value In Array(Global.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;
  • (Global.CurrentRandomEffect == 11 || Array Contains(Global.RandomnessIntensifiesArray, 11)) == True;
  • 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));
  • Destroy Effect(Event Player.PolarityEffect);
  • Destroy In-World Text(Event Player.PolarityIcon);
  • Destroy HUD Text(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,
  • Event Player.PolarityEffect = Last Created Entity;
  • Create In-World Text(All Players(All Teams), Custom String("+"), 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, 2, Yellow, White,
  • White, Visible To and String, Default Visibility);
  • Set Player Variable(Event Player, PolarityHud, Last Text ID);
  • Event Player.PolarityIcon = Last Text ID;
  • Create HUD Text(Event Player, Custom String("You are Positively charged"), Null, Null, Top, 2, Yellow, White, White,
  • Visible To and String, Default Visibility);
  • 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;
  • (Global.CurrentRandomEffect == 11 || Array Contains(Global.RandomnessIntensifiesArray, 11)) == True;
  • 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));
  • Destroy Effect(Event Player.PolarityEffect);
  • Destroy In-World Text(Event Player.PolarityIcon);
  • Destroy HUD Text(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,
  • Event Player.PolarityEffect = Last Created Entity;
  • Create In-World Text(All Players(All Teams), Custom String("-"), 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, 2, Blue, White,
  • White, Visible To and String, Default Visibility);
  • Set Player Variable(Event Player, PolarityHud, Last Text ID);
  • Event Player.PolarityIcon = Last Text ID;
  • Create HUD Text(Event Player, Custom String("You are Negatively charged"), Null, Null, Top, 2, Blue, White, White,
  • Visible To and String, Default Visibility);
  • 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;
  • (Global.CurrentRandomEffect == 11 || Array Contains(Global.RandomnessIntensifiesArray, 11)) == True;
  • }
  • actions
  • {
  • If(Compare(Player Variable(Event Player, PositivePolarity), !=, Player Variable(Victim, PositivePolarity)));
  • If(Event Player.PositivePolarity != 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;
  • (Global.CurrentRandomEffect == 11 || Array Contains(Global.RandomnessIntensifiesArray, 11)) == True;
  • Distance Between(Event Player, Victim) <= 3;
  • Or(Compare(Event Damage, ==, 30), Compare(Event Damage, ==, 25)) == True;
  • (Event Damage == 30 || Event Damage == 25) == True;
  • }
  • actions
  • {
  • If(Compare(Player Variable(Victim, PositivePolarity), ==, True));
  • Set Player Variable(Victim, PositivePolarity, False);
  • If(Victim.PositivePolarity == True);
  • Victim.PositivePolarity = False;
  • Else;
  • Set Player Variable(Victim, PositivePolarity, True);
  • 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;
  • (Global.CurrentRandomEffect == 12 || Array Contains(Global.RandomnessIntensifiesArray, 12)) == True;
  • }
  • }
  • rule("Initialise")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Or(Compare(Global Variable(CurrentRandomEffect), ==, 12), Array Contains(Global Variable(RandomnessIntensifiesArray), 12)) == True;
  • (Global.CurrentRandomEffect == 12 || Array Contains(Global.RandomnessIntensifiesArray, 12)) == True;
  • }
  • actions
  • {
  • Wait(0.016, Ignore Condition);
  • Create HUD Text(All Players(All Teams), Null, Custom String("Yes, it's janky", Null, Null, Null), Null, Left, 12, White, White,
  • White, Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Null, Custom String("Yes, it's janky"), Null, Left, 12, White, White, White,
  • Visible To and String, Default Visibility);
  • Wait(0.016, Ignore Condition);
  • Create HUD Text(All Players(All Teams), Null, Custom String("You're stuck in Third Person", Null, Null, Null), Null, Left, 12,
  • 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, Left, 12, White, White, White,
  • Visible To and String, Default Visibility);
  • Wait(0.016, Ignore Condition);
  • Create HUD Text(All Players(All Teams), Custom String("{0} Out of body experience", Icon String(Dizzy), Null, Null), Null, Null,
  • Left, 12, White, White, White, Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Custom String("{0} Out of body experience", Icon String(Dizzy)), Null, Null, Left, 12,
  • White, White, White, Visible To and String, Default Visibility);
  • Wait(0.016, Ignore Condition);
  • Create HUD Text(All Players(All Teams), Null, Custom String(" ", Null, Null, Null), Null, Left, 12, White, White, White,
  • Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Null, Custom String(" "), Null, Left, 12, 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;
  • (Global.CurrentRandomEffect == 12 || Array Contains(Global.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);
  • Start Camera(Event Player, Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player) + World Vector Of(Vector(
  • -1, 0, 0), Event Player, Rotation) + Facing Direction Of(Event Player) * -2.500, All Players(All Teams), Event Player, False),
  • Ray Cast Hit Position(Eye Position(Event Player), Eye Position(Event Player) + 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);
  • Global.CurrentRandomEffect == Global.TotalAmountOfEffects - 1;
  • }
  • }
  • rule("Initialise")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Global Variable(CurrentRandomEffect) == Subtract(Global Variable(TotalAmountOfEffects), 1);
  • Global.CurrentRandomEffect == Global.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));
  • For Global Variable(Loop, 0, Global.TotalAmountOfEffects - 1, 1);
  • Global.ArrayForRandomat[Global.Loop] = Global.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, -1, White, White, White, Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Null, Custom String("3 Random effects are enabled at once! Good luck"), Null, Left, -1,
  • White, White, White, Visible To and String, Default Visibility);
  • Wait(0.016, Ignore Condition);
  • Create HUD Text(All Players(All Teams), Custom String("{0} Randomness Intensifies", Icon String(Spiral), Null, Null), Null, Null,
  • Left, -1, Lime Green, White, White, Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Custom String("{0} Randomness Intensifies", Icon String(Spiral)), Null, Null, Left, -1,
  • Lime Green, White, White, Visible To and String, Default Visibility);
  • Wait(0.016, Ignore Condition);
  • Create HUD Text(All Players(All Teams), Null, Custom String(" ", Null, Null, Null), Null, Left, -1, White, White, White,
  • Visible To and String, Default Visibility);
  • Create HUD Text(All Players(All Teams), Null, Custom String(" "), Null, Left, -1, 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);
  • Global.CurrentRandomEffect == Global.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));
  • Global.RandomValue = Random Value In Array(Global.ArrayForRandomat);
  • Global.ArrayForRandomat = Remove From Array(Global.ArrayForRandomat, Global.RandomValue);
  • Global.RandomnessIntensifiesArray[Global.Loop] = Global.RandomValue;
  • End;
  • Call Subroutine(MakeRandomnessArray);
  • }
  • }
Join the Workshop.codes Discord