Return to post
settings
{
main
{
Description: "Randomat! Every x seconds a new random event shakes up your round of Deathmatch. More info at workshop.codes/randomat"
Description: "Randomat! Every x seconds a new random event shakes up your round of Deathmatch. v1.9.1 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
38: AvailableSoulmates
39: GravityFields
40: GravityFieldSize
41: LuckyOrbsMax
42: LuckyOrbsPositions
43: LuckyOrbsEffectsLoop
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
16: Soulmate
17: GravityFieldCooldown
18: LuckyOrbsNumber
}
subroutines
{
0: MakeRandomnessArray
1: HardReset
2: SpawnCoin
3: CreateHUDTimer
4: LuckyOrbsGoodPickup
5: LuckyOrbsBadPickup
6: LuckyOrbsRandomEffect
7: LuckyOrbsReset
}
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);
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"), 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, Null, Custom String("Next Randomat in: {0}", Round To Integer(
Global.RandomatTimer - Global.HUDTimer, Up)), Right, 5, White, Orange, Orange, Visible To and String, Default Visibility);
"Timer on HUD that counts down"
Global.HUDTimer = 0;
"Chase Timer HUD"
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, 13);
Set Global Variable(MomentumMultiplier, False);
Global.CurrentRandomEffect = 1000;
Global.RandomnessIntensifiesArray = Empty Array;
Global.NewEventStarted = False;
Global.TotalAmountOfEffects = 17;
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));
Communicate(All Players(All Teams), Countdown);
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, 0, White, White, 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("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);
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(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;
Event Player.Soulmate = False;
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));
Wait(1, Ignore Condition);
Press Button(Filtered Array(All Players(All Teams), Current Array Element != Event Player), Interact);
}
}
disabled rule("Dev stuff")
{
event
{
Ongoing - Global;
}
actions
{
Set Global Variable At Index(RandomnessIntensifiesArray, 0, 11);
Global.RandomnessIntensifiesArray[0] = 3;
}
}
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));
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,
Global.Timer = Global.Interval;
Wait(0.016, Ignore Condition);
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), 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, 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,
"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, 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, 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
{
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,
Wait(0.016, Ignore Condition);
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,
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, 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
{
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);
Wait(0.016, Ignore Condition);
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), 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")
rule("Gravity")
{
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;
Is Alive(Event Player) == True;
}
actions
{
Disallow Button(Event Player, Jump);
}
}
rule("Enable jump while dead")
{
event
{
Ongoing - Each Player;
All;
All;
}
conditions
{
(Global.CurrentRandomEffect == 3 || Array Contains(Global.RandomnessIntensifiesArray, 3)) == True;
Is Alive(Event Player) != True;
}
actions
{
Allow 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
{
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);
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,
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, 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, 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
{
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);
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, 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, 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, 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
{
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,
Wait(0.016, Ignore Condition);
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, 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, 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, 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,
"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, 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, 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 = 80;
}
}
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, 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,
"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);
Create HUD Text(All Players(All Teams), Null, Custom String(" ", Null, Null, Null), Null, Left, 0, White, White, White,
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, 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, 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, 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
{
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);
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, 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, 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, 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, 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
{
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);
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, 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,
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, 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, 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 < -12.500;
}
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
{
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,
Wait(0.016, Ignore Condition);
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);
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,
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, 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,
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, 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, 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, 0, 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, 0, 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
{
(Global.CurrentRandomEffect == 12 || Array Contains(Global.RandomnessIntensifiesArray, 12)) == True;
}
}
rule("Initialise")
{
event
{
Ongoing - Global;
}
conditions
{
(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, 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, 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, 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, Left, 12, White, White, White, Visible To and String,
Default Visibility);
}
}
rule("Set Third Person")
{
event
{
Ongoing - Each Player;
All;
All;
}
conditions
{
(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), 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("----- Soulmates ----- = 13")
{
event
{
Ongoing - Global;
}
}
rule("Settings")
{
event
{
Ongoing - Global;
}
conditions
{
(Global.CurrentRandomEffect == 13 || Array Contains(Global.RandomnessIntensifiesArray, 13)) == True;
}
}
rule("Initialise")
{
event
{
Ongoing - Global;
}
conditions
{
(Global.CurrentRandomEffect == 13 || Array Contains(Global.RandomnessIntensifiesArray, 13)) == True;
}
actions
{
Wait(0.016, Ignore Condition);
Create HUD Text(All Players(All Teams), Null, Custom String(
"Any healing or damage that happens to you also happens to your soulmate, and vice versa"), Null, Left, 13, 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 have a soulmate, yay!"), Null, Left, 13, White, White, White,
Visible To and String, Default Visibility);
Wait(0.016, Ignore Condition);
Create HUD Text(All Players(All Teams), Custom String("{0} Soulmates", Icon String(Heart)), Null, Null, Left, 13, 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, Left, 13, White, White, White, Visible To and String,
Default Visibility);
}
}
rule("Pick soulmates")
{
event
{
Ongoing - Global;
}
conditions
{
(Global.CurrentRandomEffect == 13 || Array Contains(Global.RandomnessIntensifiesArray, 13)) == True;
}
actions
{
Global.AvailableSoulmates = All Players(All Teams);
"Pick 1 player and remove it from the list of possible choices"
While(Count Of(Global.AvailableSoulmates) > 1);
Global.Player1 = Random Value In Array(Global.AvailableSoulmates);
Global.Player2 = Random Value In Array(Remove From Array(Global.AvailableSoulmates, Global.Player1));
Global.Player1.Soulmate = Global.Player2;
Global.Player2.Soulmate = Global.Player1;
Global.AvailableSoulmates = Remove From Array(Global.AvailableSoulmates, Global.Player1);
Global.AvailableSoulmates = Remove From Array(Global.AvailableSoulmates, Global.Player2);
End;
}
}
rule("Initialise player")
{
event
{
Ongoing - Each Player;
All;
All;
}
conditions
{
(Global.CurrentRandomEffect == 13 || Array Contains(Global.RandomnessIntensifiesArray, 13)) == True;
}
actions
{
Wait(0.016, Ignore Condition);
"Show who is your soulmate, or show when no soulmate was selected"
Create HUD Text(Event Player, Null, Custom String(" "), Custom String("{0} Your Soulmate: {1}", Icon String(Heart),
Event Player.Soulmate ? Custom String("{0} {1}", Event Player.Soulmate, Hero Icon String(Hero Of(Event Player.Soulmate)))
: Custom String("No one, sorry :(")), Top, 1, White, White, White, Visible To and String, Default Visibility);
If(Event Player.Soulmate);
Create Icon(Event Player, Event Player.Soulmate, Heart, Visible To and Position, Red, True);
Create Beam Effect(Event Player, Good Beam, Event Player, Event Player.Soulmate, Red, Visible To Position and Radius);
End;
}
}
rule("Player receives damage while soul linked")
{
event
{
Player Took Damage;
All;
All;
}
conditions
{
(Global.CurrentRandomEffect == 13 || Array Contains(Global.RandomnessIntensifiesArray, 13)) == True;
Event Player.Soulmate != False;
Event Ability != Null;
}
actions
{
Damage(Event Player.Soulmate, Attacker, Event Damage);
}
}
rule("Player receives healing while soul linked")
{
event
{
Player Received Healing;
All;
All;
}
conditions
{
(Global.CurrentRandomEffect == 13 || Array Contains(Global.RandomnessIntensifiesArray, 13)) == True;
Event Player.Soulmate != False;
Event Ability != Null;
}
actions
{
Heal(Event Player.Soulmate, Event Player, Event Healing);
}
}
disabled rule("----- Gravitational anomaly ----- = 14")
{
event
{
Ongoing - Global;
}
}
rule("Settings")
{
event
{
Ongoing - Global;
}
conditions
{
(Global.CurrentRandomEffect == 14 || Array Contains(Global.RandomnessIntensifiesArray, 14)) == True;
}
actions
{
"Change me to adjust the radius of each gravity field"
Global.GravityFieldSize = 2.500;
}
}
rule("Initialise")
{
event
{
Ongoing - Global;
}
conditions
{
(Global.CurrentRandomEffect == 14 || Array Contains(Global.RandomnessIntensifiesArray, 14)) == True;
}
actions
{
Wait(0.016, Ignore Condition);
Create HUD Text(All Players(All Teams), Null, Custom String("Press [Interact] to place an anti-gravity field (10 sec cooldown)."),
Null, Left, 14, White, White, White, Visible To and String, Default Visibility);
Wait(0.016, Ignore Condition);
Create HUD Text(All Players(All Teams), Custom String("{0} Gravitational Anomaly", Icon String(Moon)), Null, Null, Left, 14, 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, Left, 14, White, White, White, Visible To and String,
Default Visibility);
}
}
rule("Create effects")
{
event
{
Ongoing - Each Player;
All;
All;
}
conditions
{
(Global.CurrentRandomEffect == 14 || Array Contains(Global.RandomnessIntensifiesArray, 14)) == True;
}
actions
{
Create Effect(Filtered Array(Global.GravityFields[Index Of Array Value(All Players(All Teams), Event Player)] != 0, True),
Light Shaft, Blue, Global.GravityFields[Index Of Array Value(All Players(All Teams), Event Player)], Global.GravityFieldSize,
Visible To Position and Radius);
}
}
rule("Cooldown HUD")
{
event
{
Ongoing - Each Player;
All;
All;
}
conditions
{
(Global.CurrentRandomEffect == 14 || Array Contains(Global.RandomnessIntensifiesArray, 14)) == True;
}
actions
{
Create HUD Text(All Players(All Teams), Null, Custom String(""), Null, Left, 15, White, White, White, Visible To and String,
Default Visibility);
Create HUD Text(Filtered Array(Event Player, Event Player.GravityFieldCooldown > 0), Null, Custom String("Cooldown: {0}",
Round To Integer(Event Player.GravityFieldCooldown, Up)), Null, Left, 15, White, Blue, White, Visible To and String,
Default Visibility);
}
}
rule("Player presses interact")
{
event
{
Ongoing - Each Player;
All;
All;
}
conditions
{
(Global.CurrentRandomEffect == 14 || Array Contains(Global.RandomnessIntensifiesArray, 14)) == True;
Is Button Held(Event Player, Interact) == True;
Event Player.GravityFieldCooldown <= 0;
}
actions
{
Global.GravityFields[Index Of Array Value(All Players(All Teams), Event Player)] = Ray Cast Hit Position(Position Of(Event Player)
+ Up, Position Of(Event Player) + Down * 100, All Players(All Teams), Event Player, True);
Event Player.GravityFieldCooldown = 10;
Chase Player Variable At Rate(Event Player, GravityFieldCooldown, 0, 1, None);
}
}
rule("Player is in a gravity field")
{
event
{
Ongoing - Each Player;
All;
All;
}
conditions
{
(Global.CurrentRandomEffect == 14 || Array Contains(Global.RandomnessIntensifiesArray, 14)) == True;
Is True For Any(Global.GravityFields, X Component Of(Position Of(Event Player)) > X Component Of(Current Array Element)
- Global.GravityFieldSize && X Component Of(Position Of(Event Player)) < X Component Of(Current Array Element)
+ Global.GravityFieldSize && Z Component Of(Position Of(Event Player)) > Z Component Of(Current Array Element)
- Global.GravityFieldSize && Z Component Of(Position Of(Event Player)) < Z Component Of(Current Array Element)
+ Global.GravityFieldSize && Current Array Element) == True;
}
actions
{
Set Gravity(Event Player, 0);
Apply Impulse(Event Player, Up, 3, To Player, Cancel Contrary Motion);
}
}
rule("Player is not in a gravity field")
{
event
{
Ongoing - Each Player;
All;
All;
}
conditions
{
(Global.CurrentRandomEffect == 14 || Array Contains(Global.RandomnessIntensifiesArray, 14)) == True;
Is True For Any(Global.GravityFields, X Component Of(Position Of(Event Player)) > X Component Of(Current Array Element)
- Global.GravityFieldSize && X Component Of(Position Of(Event Player)) < X Component Of(Current Array Element)
+ Global.GravityFieldSize && Z Component Of(Position Of(Event Player)) > Z Component Of(Current Array Element)
- Global.GravityFieldSize && Z Component Of(Position Of(Event Player)) < Z Component Of(Current Array Element)
+ Global.GravityFieldSize && Current Array Element) != True;
}
actions
{
If(Array Contains(Global.RandomnessIntensifiesArray, 3));
Set Gravity(Event Player, 1500);
Else;
Set Gravity(Event Player, 100);
End;
}
}
disabled rule("----- Lucky Orbs ----- = 15")
{
event
{
Ongoing - Global;
}
}
rule("Settings")
{
event
{
Ongoing - Global;
}
conditions
{
(Global.CurrentRandomEffect == 15 || Array Contains(Global.RandomnessIntensifiesArray, 15)) == True;
}
actions
{
"Adjust me to change the amount of orbs that are present at once. Don't go over 20."
Global.LuckyOrbsMax = 20;
}
}
rule("Initialise")
{
event
{
Ongoing - Global;
}
conditions
{
(Global.CurrentRandomEffect == 15 || Array Contains(Global.RandomnessIntensifiesArray, 15)) == True;
}
actions
{
Global.LuckyOrbsPositions = Empty Array;
Wait(0.016, Ignore Condition);
Create HUD Text(All Players(All Teams), Null, Custom String("Pick up an orb with [Crouch]. What do they do? Find out!"), Null,
Left, 15, White, White, White, Visible To and String, Default Visibility);
Wait(0.016, Ignore Condition);
Create HUD Text(All Players(All Teams), Custom String("{0} Lucky Orbs", Icon String(Club)), Null, Null, Left, 15, 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, Left, 15, White, White, White, Visible To and String,
Default Visibility);
}
}
rule("Player is crouching (on an orb)")
{
event
{
Ongoing - Each Player;
All;
All;
}
conditions
{
(Global.CurrentRandomEffect == 15 || Array Contains(Global.RandomnessIntensifiesArray, 15)) == True;
Is Crouching(Event Player) == True;
Is True For Any(Global.LuckyOrbsPositions, Distance Between(Position Of(Event Player), Current Array Element) < 1.500) == True;
}
actions
{
For Global Variable(LuckyOrbsEffectsLoop, 0, Count Of(Global.LuckyOrbsPositions), 1);
If(Distance Between(Position Of(Event Player), Global.LuckyOrbsPositions[Global.LuckyOrbsEffectsLoop]) < 1.500);
Global.LuckyOrbsPositions = Remove From Array(Global.LuckyOrbsPositions, Global.LuckyOrbsPositions[Global.LuckyOrbsEffectsLoop]);
Break;
End;
End;
Call Subroutine(LuckyOrbsRandomEffect);
}
}
rule("Create Orb Positions")
{
event
{
Ongoing - Global;
}
conditions
{
(Global.CurrentRandomEffect == 15 || Array Contains(Global.RandomnessIntensifiesArray, 15)) == True;
Count Of(Global.LuckyOrbsPositions) < Global.LuckyOrbsMax;
Number of Living Players(All Teams) > 0;
Has Spawned(First Of(All Players(All Teams))) == True;
}
actions
{
Wait(0.150, Ignore Condition);
Global.LuckyOrbsPositions = Append To Array(Global.LuckyOrbsPositions, Nearest Walkable Position(Position Of(Random Value In Array(
All Living Players(All Teams))) + Vector(Random Real(-15, 15), Random Real(1, 5), Random Real(-15, 15))));
Loop If Condition Is True;
}
}
rule("Create Orb Effects")
{
event
{
Ongoing - Global;
}
conditions
{
(Global.CurrentRandomEffect == 15 || Array Contains(Global.RandomnessIntensifiesArray, 15)) == True;
}
actions
{
"Yeah this sucks, I would prefer to use a loop, but unfortunately this makes things a little easier in the long run."
Create Effect(All Players(All Teams), Orb, Purple, Global.LuckyOrbsPositions[0], 1, Visible To Position and Radius);
Create Effect(All Players(All Teams), Orb, Purple, Global.LuckyOrbsPositions[1], 1, Visible To Position and Radius);
Create Effect(All Players(All Teams), Orb, Purple, Global.LuckyOrbsPositions[2], 1, Visible To Position and Radius);
Create Effect(All Players(All Teams), Orb, Purple, Global.LuckyOrbsPositions[3], 1, Visible To Position and Radius);
Create Effect(All Players(All Teams), Orb, Purple, Global.LuckyOrbsPositions[4], 1, Visible To Position and Radius);
Create Effect(All Players(All Teams), Orb, Purple, Global.LuckyOrbsPositions[5], 1, Visible To Position and Radius);
Create Effect(All Players(All Teams), Orb, Purple, Global.LuckyOrbsPositions[6], 1, Visible To Position and Radius);
Create Effect(All Players(All Teams), Orb, Purple, Global.LuckyOrbsPositions[7], 1, Visible To Position and Radius);
Create Effect(All Players(All Teams), Orb, Purple, Global.LuckyOrbsPositions[8], 1, Visible To Position and Radius);
Create Effect(All Players(All Teams), Orb, Purple, Global.LuckyOrbsPositions[9], 1, Visible To Position and Radius);
Create Effect(All Players(All Teams), Orb, Purple, Global.LuckyOrbsPositions[10], 1, Visible To Position and Radius);
Create Effect(All Players(All Teams), Orb, Purple, Global.LuckyOrbsPositions[11], 1, Visible To Position and Radius);
Create Effect(All Players(All Teams), Orb, Purple, Global.LuckyOrbsPositions[12], 1, Visible To Position and Radius);
Create Effect(All Players(All Teams), Orb, Purple, Global.LuckyOrbsPositions[13], 1, Visible To Position and Radius);
Create Effect(All Players(All Teams), Orb, Purple, Global.LuckyOrbsPositions[14], 1, Visible To Position and Radius);
Create Effect(All Players(All Teams), Orb, Purple, Global.LuckyOrbsPositions[15], 1, Visible To Position and Radius);
Create Effect(All Players(All Teams), Orb, Purple, Global.LuckyOrbsPositions[16], 1, Visible To Position and Radius);
Create Effect(All Players(All Teams), Orb, Purple, Global.LuckyOrbsPositions[17], 1, Visible To Position and Radius);
Create Effect(All Players(All Teams), Orb, Purple, Global.LuckyOrbsPositions[18], 1, Visible To Position and Radius);
Create Effect(All Players(All Teams), Orb, Purple, Global.LuckyOrbsPositions[19], 1, Visible To Position and Radius);
}
}
rule("Player died")
{
event
{
Ongoing - Each Player;
All;
All;
}
conditions
{
(Global.CurrentRandomEffect == 15 || Array Contains(Global.RandomnessIntensifiesArray, 15)) == True;
Is Alive(Event Player) == True;
}
actions
{
Call Subroutine(LuckyOrbsReset);
}
}
rule("Event ended")
{
event
{
Ongoing - Each Player;
All;
All;
}
conditions
{
(Global.CurrentRandomEffect != 15 && !Array Contains(Global.RandomnessIntensifiesArray, 15)) == True;
}
actions
{
Call Subroutine(LuckyOrbsReset);
}
}
rule("Subroutine - Pick random effect")
{
event
{
Subroutine;
LuckyOrbsRandomEffect;
}
actions
{
Event Player.LuckyOrbsNumber = Random Integer(0, 14);
If(Event Player.LuckyOrbsNumber == 0);
Set Status(Event Player, Null, Rooted, 5);
Small Message(Event Player, Custom String("{0} Rooted for 5 seconds!", Icon String(No)));
Call Subroutine(LuckyOrbsBadPickup);
Else If(Event Player.LuckyOrbsNumber == 1);
Set Max Health(Event Player, 150);
Small Message(Event Player, Custom String("{0} 150% Max health", Icon String(Plus)));
Call Subroutine(LuckyOrbsGoodPickup);
Else If(Event Player.LuckyOrbsNumber == 2);
Set Damage Dealt(Event Player, 150);
Small Message(Event Player, Custom String("{0} 150% Damage dealt", Icon String(Plus)));
Call Subroutine(LuckyOrbsGoodPickup);
Else If(Event Player.LuckyOrbsNumber == 3);
Set Max Health(Event Player, 50);
Small Message(Event Player, Custom String("{0} 50% Max health", Icon String(No)));
Call Subroutine(LuckyOrbsBadPickup);
Else If(Event Player.LuckyOrbsNumber == 4);
Set Damage Dealt(Event Player, 50);
Small Message(Event Player, Custom String("{0} 50% Damage dealt", Icon String(No)));
Call Subroutine(LuckyOrbsBadPickup);
Else If(Event Player.LuckyOrbsNumber == 5);
Small Message(Event Player, Custom String("{0} You died", Icon String(No)));
Call Subroutine(LuckyOrbsBadPickup);
Kill(Event Player, Null);
Else If(Event Player.LuckyOrbsNumber == 6);
Set Move Speed(Event Player, 200);
Small Message(Event Player, Custom String("{0} You're very fast!", Icon String(Plus)));
Call Subroutine(LuckyOrbsGoodPickup);
Else If(Event Player.LuckyOrbsNumber == 7);
Set Projectile Speed(Event Player, 500);
Small Message(Event Player, Custom String("{0} Your projectile speed is massively increased", Icon String(Plus)));
Call Subroutine(LuckyOrbsGoodPickup);
Else If(Event Player.LuckyOrbsNumber == 8);
Set Ultimate Charge(Event Player, 100);
Small Message(Event Player, Custom String("{0} You gained 100% Ultimate charge", Icon String(Plus)));
Call Subroutine(LuckyOrbsGoodPickup);
Else If(Event Player.LuckyOrbsNumber == 9);
Set Projectile Speed(Event Player, 50);
Small Message(Event Player, Custom String("{0} Your projectiles travel much slower", Icon String(No)));
Call Subroutine(LuckyOrbsBadPickup);
Else If(Event Player.LuckyOrbsNumber == 10);
Set Status(Event Player, Null, Burning, 9999);
Start Damage Over Time(Event Player, Null, 9999, 3);
Small Message(Event Player, Custom String("{0} You're burning", Icon String(No)));
Call Subroutine(LuckyOrbsBadPickup);
Else If(Event Player.LuckyOrbsNumber == 11);
Set Aim Speed(Event Player, 200);
Small Message(Event Player, Custom String("{0} Your aim speed is increased", Icon String(No)));
Call Subroutine(LuckyOrbsBadPickup);
Else If(Event Player.LuckyOrbsNumber == 12);
Set Status(Event Player, Null, Knocked Down, 2);
Small Message(Event Player, Custom String("{0} Knocked down for 2 seconds", Icon String(No)));
Call Subroutine(LuckyOrbsBadPickup);
Else If(Event Player.LuckyOrbsNumber == 13);
Modify Player Score(Event Player, -2);
Small Message(Event Player, Custom String("{0} -2 to your score", Icon String(No)));
Call Subroutine(LuckyOrbsBadPickup);
Else If(Event Player.LuckyOrbsNumber == 14);
Modify Player Score(Event Player, 2);
Small Message(Event Player, Custom String("{0} +2 to your score", Icon String(Plus)));
Call Subroutine(LuckyOrbsGoodPickup);
End;
}
}
rule("Subroutine - Good pickup effect")
{
event
{
Subroutine;
LuckyOrbsGoodPickup;
}
actions
{
Play Effect(Event Player, Buff Impact Sound, White, Event Player, 100);
Play Effect(Event Player, Ring Explosion, Green, Event Player, 5);
Play Effect(All Players(All Teams), Bad Explosion, Purple, Event Player, 2);
}
}
rule("Subroutine - Bad pickup effect")
{
event
{
Subroutine;
LuckyOrbsBadPickup;
}
actions
{
Play Effect(Event Player, Debuff Impact Sound, White, Event Player, 100);
Play Effect(Event Player, Ring Explosion, Red, Event Player, 5);
Play Effect(All Players(All Teams), Bad Explosion, Purple, Event Player, 2);
}
}
rule("Subroutine - Reset all effects")
{
event
{
Subroutine;
LuckyOrbsReset;
}
actions
{
Set Max Health(Event Player, 100);
Set Damage Dealt(Event Player, 100);
Set Projectile Speed(Event Player, 100);
Clear Status(Event Player, Rooted);
Set Invisible(Event Player, None);
Set Aim Speed(Event Player, 100);
Clear Status(Event Player, Burning);
Stop All Damage Over Time(Event Player);
Set Move Speed(Event Player, 100);
}
}
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, 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);
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, 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, 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);
}
}