Back to home

Skittle Speedrunners [Workshop Jam Mode]

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

Category:
Custom game mode

Author:
CactusPuppy

Rating:
3

Version:
1.0.0

Posted:
2 months ago

Last updated:
2 months ago

Tags:
lucio deathmatch

Share this workshop!

Options

Skittle Speedrunners

Your Skittles have spilled everywhere! Pair up your colors to earn points while doing your best to stop your rival speedrunners from doing the same!

Notes/Changelog

Version 1.0.0

Press Interact to pick up your skittles. Future versions will omit this extraneous step.

variables {
	global:
		0: locations
		1: skittleLocations
		2: skittleIsActive
		3: skittles
	player:
		0: pickedUpIndex
		1: dropAreaIndex
}
rule ("===Var Setup===") {
    event {
        Ongoing - Global;
    }

    actions {
        Disable Built-In Game Mode Scoring;
        Abort;
    }
}

rule ("Create Locations") {
    event {
        Ongoing - Global;
    }

    actions {
        Set Global Variable(locations, Empty Array);
        Modify Global Variable(locations, Append To Array, Vector(193.498, 8.999, 111.924));
        Modify Global Variable(locations, Append To Array, Vector(206.634, 7.998, 110.429));
        Modify Global Variable(locations, Append To Array, Vector(206.219, 8.027, 102.448));
        Modify Global Variable(locations, Append To Array, Vector(193.822, 7.998, 101.771));
        Modify Global Variable(locations, Append To Array, Vector(183.256, 9.001, 105.915));
        Modify Global Variable(locations, Append To Array, Vector(178.432, 9.001, 105.597));
        Modify Global Variable(locations, Append To Array, Vector(177.111, 9.001, 98.247));
        Modify Global Variable(locations, Append To Array, Vector(182.989, 8.998, 96.84));
        Modify Global Variable(locations, Append To Array, Vector(173.602, 5.001, 92.573));
        Modify Global Variable(locations, Append To Array, Vector(177.519, 5.001, 88.924));
        Modify Global Variable(locations, Append To Array, Vector(186.506, 1.001, 89.781));
        Modify Global Variable(locations, Append To Array, Vector(182.677, 1.001, 84.713));
        Modify Global Variable(locations, Append To Array, Vector(183.504, 1.001, 80.814));
        Modify Global Variable(locations, Append To Array, Vector(196.952, 1.001, 74.892));
        Modify Global Variable(locations, Append To Array, Vector(203.117, -0.001, 77.85));
        Modify Global Variable(locations, Append To Array, Vector(208.879, 0.041, 83.388));
        Modify Global Variable(locations, Append To Array, Vector(215.155, 1.001, 77.868));
        Modify Global Variable(locations, Append To Array, Vector(209.646, -0.002, 71.279));
        Modify Global Variable(locations, Append To Array, Vector(223.982, 1, 77.627));
        Modify Global Variable(locations, Append To Array, Vector(229.21, 2, 86.248));
        Modify Global Variable(locations, Append To Array, Vector(216.556, 1.998, 92.516));
        Modify Global Variable(locations, Append To Array, Vector(221.771, 6, 103.02));
        Modify Global Variable(locations, Append To Array, Vector(229.631, 3.998, 103.244));
        Modify Global Variable(locations, Append To Array, Vector(234.429, 3.998, 103.053));
        Modify Global Variable(locations, Append To Array, Vector(234.842, 3.999, 113.409));
        Modify Global Variable(locations, Append To Array, Vector(223.709, 5.001, 110.339));
        Modify Global Variable(locations, Append To Array, Vector(201.189, 8.163, 110.032));
        Modify Global Variable(locations, Append To Array, Vector(190.063, 8.998, 109.569));
        Modify Global Variable(locations, Append To Array, Vector(168.028, 4.998, 83.873));
        Modify Global Variable(locations, Append To Array, Vector(171.432, 4.999, 77.021));
        Modify Global Variable(locations, Append To Array, Vector(181.091, 6, 77.483));
        Modify Global Variable(locations, Append To Array, Vector(177.121, 6.999, 58.321));
        Modify Global Variable(locations, Append To Array, Vector(170.782, 6.999, 62.763));
        Modify Global Variable(locations, Append To Array, Vector(175.82, 6.996, 69.134));
        Modify Global Variable(locations, Append To Array, Vector(178.227, -0.001, 51.796));
        Modify Global Variable(locations, Append To Array, Vector(190.765, 2.999, 55.93));
        Modify Global Variable(locations, Append To Array, Vector(193.223, 0.999, 67.152));
        Modify Global Variable(locations, Append To Array, Vector(187.359, 0.999, 71.441));
        Modify Global Variable(locations, Append To Array, Vector(195.824, 7.999, 55.786));
        Modify Global Variable(locations, Append To Array, Vector(206.813, 7.999, 53.361));
        Modify Global Variable(locations, Append To Array, Vector(204.014, 7.998, 68.277));
        Modify Global Variable(locations, Append To Array, Vector(200.911, 9.001, 80.855));
        Modify Global Variable(locations, Append To Array, Vector(209.769, 9.001, 83.861));
        Modify Global Variable(locations, Append To Array, Vector(221.736, 7.998, 85.665));
        Modify Global Variable(locations, Append To Array, Vector(216.466, 7.999, 85.383));
        Modify Global Variable(locations, Append To Array, Vector(219.926, 9.001, 64.543));
        Modify Global Variable(locations, Append To Array, Vector(229.626, 9.001, 78.786));
        Modify Global Variable(locations, Append To Array, Vector(234.424, 8.979, 87.084));
        Modify Global Variable(locations, Append To Array, Vector(227.993, 12.998, 64.581));
        Modify Global Variable(locations, Append To Array, Vector(217.463, 14.002, 66.385));
        Modify Global Variable(locations, Append To Array, Vector(219.613, 11.998, 54.063));
        Modify Global Variable(locations, Append To Array, Vector(213.938, 11.495, 44.877));
        Modify Global Variable(locations, Append To Array, Vector(188.924, 7.999, 64.185));
        Modify Global Variable(locations, Append To Array, Vector(183.347, 7.999, 55.939));
        Modify Global Variable(locations, Append To Array, Vector(207.192, 16.499, 47.098));
        Modify Global Variable(locations, Append To Array, Vector(196.229, 16.499, 51.54));
        Modify Global Variable(locations, Append To Array, Vector(196.49, 16.499, 68.912));
    }
}

rule ("===Gameplay===") {
    event {
        Ongoing - Global;
    }

    actions {
        Abort;
    }
}

rule ("Shorten Assemble Heroes") {
    event {
        Ongoing - Global;
    }

    conditions {
        Is Assembling Heroes == True;
    }

    actions {
        Set Match Time(10);
    }
}

rule ("At Start of Game, generate skittle locations") {
    event {
        Ongoing - Global;
    }

    conditions {
        Is Game In Progress == True;
    }

    actions {
        Set Global Variable At Index(skittleLocations, 0, Random Value In Array(Global Variable(locations)));
        Modify Global Variable(locations, Remove From Array By Value, First Of(Global Variable(skittleLocations)));
        Create Effect(All Players(All Teams), Orb, Aqua, First Of(Global Variable(skittleLocations)), 1, Visible To);
        Set Global Variable At Index(skittles, 0, Last Created Entity);
        Set Global Variable At Index(skittleIsActive, 0, True);
        Set Global Variable At Index(skittleLocations, 1, Random Value In Array(Global Variable(locations)));
        Modify Global Variable(locations, Remove From Array By Value, Value In Array(Global Variable(skittleLocations), 1));
        Create Effect(All Players(All Teams), Orb, Aqua, Value In Array(Global Variable(skittleLocations), 1), 1, Visible To);
        Set Global Variable At Index(skittles, 1, Last Created Entity);
        Set Global Variable At Index(skittleIsActive, 1, True);
        Set Global Variable At Index(skittleLocations, 2, Random Value In Array(Global Variable(locations)));
        Modify Global Variable(locations, Remove From Array By Value, Value In Array(Global Variable(skittleLocations), 2));
        Create Effect(All Players(All Teams), Orb, Aqua, Value In Array(Global Variable(skittleLocations), 2), 1, Visible To);
        Set Global Variable At Index(skittles, 2, Last Created Entity);
        Set Global Variable At Index(skittleIsActive, 2, True);
        Set Global Variable At Index(skittleLocations, 3, Random Value In Array(Global Variable(locations)));
        Modify Global Variable(locations, Remove From Array By Value, Value In Array(Global Variable(skittleLocations), 3));
        Create Effect(All Players(All Teams), Orb, Aqua, Value In Array(Global Variable(skittleLocations), 3), 1, Visible To);
        Set Global Variable At Index(skittles, 3, Last Created Entity);
        Set Global Variable At Index(skittleIsActive, 3, True);
        Set Global Variable At Index(skittleLocations, 4, Random Value In Array(Global Variable(locations)));
        Modify Global Variable(locations, Remove From Array By Value, Value In Array(Global Variable(skittleLocations), 4));
        Create Effect(All Players(All Teams), Orb, Aqua, Value In Array(Global Variable(skittleLocations), 4), 1, Visible To);
        Set Global Variable At Index(skittles, 4, Last Created Entity);
        Set Global Variable At Index(skittleIsActive, 4, True);
        Set Global Variable At Index(skittleLocations, 5, Random Value In Array(Global Variable(locations)));
        Modify Global Variable(locations, Remove From Array By Value, Value In Array(Global Variable(skittleLocations), 5));
        Create Effect(All Players(All Teams), Orb, Aqua, Value In Array(Global Variable(skittleLocations), 5), 1, Visible To);
        Set Global Variable At Index(skittles, 5, Last Created Entity);
        Set Global Variable At Index(skittleIsActive, 5, True);
        Set Global Variable At Index(skittleLocations, 6, Random Value In Array(Global Variable(locations)));
        Modify Global Variable(locations, Remove From Array By Value, Value In Array(Global Variable(skittleLocations), 6));
        Create Effect(All Players(All Teams), Orb, Aqua, Value In Array(Global Variable(skittleLocations), 6), 1, Visible To);
        Set Global Variable At Index(skittles, 6, Last Created Entity);
        Set Global Variable At Index(skittleIsActive, 6, True);
        Set Global Variable At Index(skittleLocations, 7, Random Value In Array(Global Variable(locations)));
        Modify Global Variable(locations, Remove From Array By Value, Value In Array(Global Variable(skittleLocations), 7));
        Create Effect(All Players(All Teams), Orb, Aqua, Value In Array(Global Variable(skittleLocations), 7), 1, Visible To);
        Set Global Variable At Index(skittles, 7, Last Created Entity);
        Set Global Variable At Index(skittleIsActive, 7, True);
        Set Global Variable At Index(skittleLocations, 8, Random Value In Array(Global Variable(locations)));
        Modify Global Variable(locations, Remove From Array By Value, Value In Array(Global Variable(skittleLocations), 8));
        Create Effect(All Players(All Teams), Orb, Green, Value In Array(Global Variable(skittleLocations), 8), 1, Visible To);
        Set Global Variable At Index(skittles, 8, Last Created Entity);
        Set Global Variable At Index(skittleIsActive, 8, True);
        Set Global Variable At Index(skittleLocations, 9, Random Value In Array(Global Variable(locations)));
        Modify Global Variable(locations, Remove From Array By Value, Value In Array(Global Variable(skittleLocations), 9));
        Create Effect(All Players(All Teams), Orb, Green, Value In Array(Global Variable(skittleLocations), 9), 1, Visible To);
        Set Global Variable At Index(skittles, 9, Last Created Entity);
        Set Global Variable At Index(skittleIsActive, 9, True);
        Set Global Variable At Index(skittleLocations, 10, Random Value In Array(Global Variable(locations)));
        Modify Global Variable(locations, Remove From Array By Value, Value In Array(Global Variable(skittleLocations), 10));
        Create Effect(All Players(All Teams), Orb, Green, Value In Array(Global Variable(skittleLocations), 10), 1, Visible To);
        Set Global Variable At Index(skittles, 10, Last Created Entity);
        Set Global Variable At Index(skittleIsActive, 10, True);
        Set Global Variable At Index(skittleLocations, 11, Random Value In Array(Global Variable(locations)));
        Modify Global Variable(locations, Remove From Array By Value, Value In Array(Global Variable(skittleLocations), 11));
        Create Effect(All Players(All Teams), Orb, Green, Value In Array(Global Variable(skittleLocations), 11), 1, Visible To);
        Set Global Variable At Index(skittles, 11, Last Created Entity);
        Set Global Variable At Index(skittleIsActive, 11, True);
        Set Global Variable At Index(skittleLocations, 12, Random Value In Array(Global Variable(locations)));
        Modify Global Variable(locations, Remove From Array By Value, Value In Array(Global Variable(skittleLocations), 12));
        Create Effect(All Players(All Teams), Orb, Green, Value In Array(Global Variable(skittleLocations), 12), 1, Visible To);
        Set Global Variable At Index(skittles, 12, Last Created Entity);
        Set Global Variable At Index(skittleIsActive, 12, True);
        Set Global Variable At Index(skittleLocations, 13, Random Value In Array(Global Variable(locations)));
        Modify Global Variable(locations, Remove From Array By Value, Value In Array(Global Variable(skittleLocations), 13));
        Create Effect(All Players(All Teams), Orb, Green, Value In Array(Global Variable(skittleLocations), 13), 1, Visible To);
        Set Global Variable At Index(skittles, 13, Last Created Entity);
        Set Global Variable At Index(skittleIsActive, 13, True);
        Set Global Variable At Index(skittleLocations, 14, Random Value In Array(Global Variable(locations)));
        Modify Global Variable(locations, Remove From Array By Value, Value In Array(Global Variable(skittleLocations), 14));
        Create Effect(All Players(All Teams), Orb, Green, Value In Array(Global Variable(skittleLocations), 14), 1, Visible To);
        Set Global Variable At Index(skittles, 14, Last Created Entity);
        Set Global Variable At Index(skittleIsActive, 14, True);
        Set Global Variable At Index(skittleLocations, 15, Random Value In Array(Global Variable(locations)));
        Modify Global Variable(locations, Remove From Array By Value, Value In Array(Global Variable(skittleLocations), 15));
        Create Effect(All Players(All Teams), Orb, Green, Value In Array(Global Variable(skittleLocations), 15), 1, Visible To);
        Set Global Variable At Index(skittles, 15, Last Created Entity);
        Set Global Variable At Index(skittleIsActive, 15, True);
        Set Global Variable At Index(skittleLocations, 16, Random Value In Array(Global Variable(locations)));
        Modify Global Variable(locations, Remove From Array By Value, Value In Array(Global Variable(skittleLocations), 16));
        Create Effect(All Players(All Teams), Orb, Orange, Value In Array(Global Variable(skittleLocations), 16), 1, Visible To);
        Set Global Variable At Index(skittles, 16, Last Created Entity);
        Set Global Variable At Index(skittleIsActive, 16, True);
        Set Global Variable At Index(skittleLocations, 17, Random Value In Array(Global Variable(locations)));
        Modify Global Variable(locations, Remove From Array By Value, Value In Array(Global Variable(skittleLocations), 17));
        Create Effect(All Players(All Teams), Orb, Orange, Value In Array(Global Variable(skittleLocations), 17), 1, Visible To);
        Set Global Variable At Index(skittles, 17, Last Created Entity);
        Set Global Variable At Index(skittleIsActive, 17, True);
        Set Global Variable At Index(skittleLocations, 18, Random Value In Array(Global Variable(locations)));
        Modify Global Variable(locations, Remove From Array By Value, Value In Array(Global Variable(skittleLocations), 18));
        Create Effect(All Players(All Teams), Orb, Orange, Value In Array(Global Variable(skittleLocations), 18), 1, Visible To);
        Set Global Variable At Index(skittles, 18, Last Created Entity);
        Set Global Variable At Index(skittleIsActive, 18, True);
        Set Global Variable At Index(skittleLocations, 19, Random Value In Array(Global Variable(locations)));
        Modify Global Variable(locations, Remove From Array By Value, Value In Array(Global Variable(skittleLocations), 19));
        Create Effect(All Players(All Teams), Orb, Orange, Value In Array(Global Variable(skittleLocations), 19), 1, Visible To);
        Set Global Variable At Index(skittles, 19, Last Created Entity);
        Set Global Variable At Index(skittleIsActive, 19, True);
        Set Global Variable At Index(skittleLocations, 20, Random Value In Array(Global Variable(locations)));
        Modify Global Variable(locations, Remove From Array By Value, Value In Array(Global Variable(skittleLocations), 20));
        Create Effect(All Players(All Teams), Orb, Orange, Value In Array(Global Variable(skittleLocations), 20), 1, Visible To);
        Set Global Variable At Index(skittles, 20, Last Created Entity);
        Set Global Variable At Index(skittleIsActive, 20, True);
        Set Global Variable At Index(skittleLocations, 21, Random Value In Array(Global Variable(locations)));
        Modify Global Variable(locations, Remove From Array By Value, Value In Array(Global Variable(skittleLocations), 21));
        Create Effect(All Players(All Teams), Orb, Orange, Value In Array(Global Variable(skittleLocations), 21), 1, Visible To);
        Set Global Variable At Index(skittles, 21, Last Created Entity);
        Set Global Variable At Index(skittleIsActive, 21, True);
        Set Global Variable At Index(skittleLocations, 22, Random Value In Array(Global Variable(locations)));
        Modify Global Variable(locations, Remove From Array By Value, Value In Array(Global Variable(skittleLocations), 22));
        Create Effect(All Players(All Teams), Orb, Orange, Value In Array(Global Variable(skittleLocations), 22), 1, Visible To);
        Set Global Variable At Index(skittles, 22, Last Created Entity);
        Set Global Variable At Index(skittleIsActive, 22, True);
        Set Global Variable At Index(skittleLocations, 23, Random Value In Array(Global Variable(locations)));
        Modify Global Variable(locations, Remove From Array By Value, Value In Array(Global Variable(skittleLocations), 23));
        Create Effect(All Players(All Teams), Orb, Orange, Value In Array(Global Variable(skittleLocations), 23), 1, Visible To);
        Set Global Variable At Index(skittles, 23, Last Created Entity);
        Set Global Variable At Index(skittleIsActive, 23, True);
        Set Global Variable At Index(skittleLocations, 24, Random Value In Array(Global Variable(locations)));
        Modify Global Variable(locations, Remove From Array By Value, Value In Array(Global Variable(skittleLocations), 24));
        Create Effect(All Players(All Teams), Orb, Purple, Value In Array(Global Variable(skittleLocations), 24), 1, Visible To);
        Set Global Variable At Index(skittles, 24, Last Created Entity);
        Set Global Variable At Index(skittleIsActive, 24, True);
        Set Global Variable At Index(skittleLocations, 25, Random Value In Array(Global Variable(locations)));
        Modify Global Variable(locations, Remove From Array By Value, Value In Array(Global Variable(skittleLocations), 25));
        Create Effect(All Players(All Teams), Orb, Purple, Value In Array(Global Variable(skittleLocations), 25), 1, Visible To);
        Set Global Variable At Index(skittles, 25, Last Created Entity);
        Set Global Variable At Index(skittleIsActive, 25, True);
        Set Global Variable At Index(skittleLocations, 26, Random Value In Array(Global Variable(locations)));
        Modify Global Variable(locations, Remove From Array By Value, Value In Array(Global Variable(skittleLocations), 26));
        Create Effect(All Players(All Teams), Orb, Purple, Value In Array(Global Variable(skittleLocations), 26), 1, Visible To);
        Set Global Variable At Index(skittles, 26, Last Created Entity);
        Set Global Variable At Index(skittleIsActive, 26, True);
        Set Global Variable At Index(skittleLocations, 27, Random Value In Array(Global Variable(locations)));
        Modify Global Variable(locations, Remove From Array By Value, Value In Array(Global Variable(skittleLocations), 27));
        Create Effect(All Players(All Teams), Orb, Purple, Value In Array(Global Variable(skittleLocations), 27), 1, Visible To);
        Set Global Variable At Index(skittles, 27, Last Created Entity);
        Set Global Variable At Index(skittleIsActive, 27, True);
        Set Global Variable At Index(skittleLocations, 28, Random Value In Array(Global Variable(locations)));
        Modify Global Variable(locations, Remove From Array By Value, Value In Array(Global Variable(skittleLocations), 28));
        Create Effect(All Players(All Teams), Orb, Purple, Value In Array(Global Variable(skittleLocations), 28), 1, Visible To);
        Set Global Variable At Index(skittles, 28, Last Created Entity);
        Set Global Variable At Index(skittleIsActive, 28, True);
        Set Global Variable At Index(skittleLocations, 29, Random Value In Array(Global Variable(locations)));
        Modify Global Variable(locations, Remove From Array By Value, Value In Array(Global Variable(skittleLocations), 29));
        Create Effect(All Players(All Teams), Orb, Purple, Value In Array(Global Variable(skittleLocations), 29), 1, Visible To);
        Set Global Variable At Index(skittles, 29, Last Created Entity);
        Set Global Variable At Index(skittleIsActive, 29, True);
        Set Global Variable At Index(skittleLocations, 30, Random Value In Array(Global Variable(locations)));
        Modify Global Variable(locations, Remove From Array By Value, Value In Array(Global Variable(skittleLocations), 30));
        Create Effect(All Players(All Teams), Orb, Purple, Value In Array(Global Variable(skittleLocations), 30), 1, Visible To);
        Set Global Variable At Index(skittles, 30, Last Created Entity);
        Set Global Variable At Index(skittleIsActive, 30, True);
        Set Global Variable At Index(skittleLocations, 31, Random Value In Array(Global Variable(locations)));
        Modify Global Variable(locations, Remove From Array By Value, Value In Array(Global Variable(skittleLocations), 31));
        Create Effect(All Players(All Teams), Orb, Purple, Value In Array(Global Variable(skittleLocations), 31), 1, Visible To);
        Set Global Variable At Index(skittles, 31, Last Created Entity);
        Set Global Variable At Index(skittleIsActive, 31, True);
        Set Global Variable At Index(skittleLocations, 32, Random Value In Array(Global Variable(locations)));
        Modify Global Variable(locations, Remove From Array By Value, Value In Array(Global Variable(skittleLocations), 32));
        Create Effect(All Players(All Teams), Orb, Red, Value In Array(Global Variable(skittleLocations), 32), 1, Visible To);
        Set Global Variable At Index(skittles, 32, Last Created Entity);
        Set Global Variable At Index(skittleIsActive, 32, True);
        Set Global Variable At Index(skittleLocations, 33, Random Value In Array(Global Variable(locations)));
        Modify Global Variable(locations, Remove From Array By Value, Value In Array(Global Variable(skittleLocations), 33));
        Create Effect(All Players(All Teams), Orb, Red, Value In Array(Global Variable(skittleLocations), 33), 1, Visible To);
        Set Global Variable At Index(skittles, 33, Last Created Entity);
        Set Global Variable At Index(skittleIsActive, 33, True);
        Set Global Variable At Index(skittleLocations, 34, Random Value In Array(Global Variable(locations)));
        Modify Global Variable(locations, Remove From Array By Value, Value In Array(Global Variable(skittleLocations), 34));
        Create Effect(All Players(All Teams), Orb, Red, Value In Array(Global Variable(skittleLocations), 34), 1, Visible To);
        Set Global Variable At Index(skittles, 34, Last Created Entity);
        Set Global Variable At Index(skittleIsActive, 34, True);
        Set Global Variable At Index(skittleLocations, 35, Random Value In Array(Global Variable(locations)));
        Modify Global Variable(locations, Remove From Array By Value, Value In Array(Global Variable(skittleLocations), 35));
        Create Effect(All Players(All Teams), Orb, Red, Value In Array(Global Variable(skittleLocations), 35), 1, Visible To);
        Set Global Variable At Index(skittles, 35, Last Created Entity);
        Set Global Variable At Index(skittleIsActive, 35, True);
        Set Global Variable At Index(skittleLocations, 36, Random Value In Array(Global Variable(locations)));
        Modify Global Variable(locations, Remove From Array By Value, Value In Array(Global Variable(skittleLocations), 36));
        Create Effect(All Players(All Teams), Orb, Red, Value In Array(Global Variable(skittleLocations), 36), 1, Visible To);
        Set Global Variable At Index(skittles, 36, Last Created Entity);
        Set Global Variable At Index(skittleIsActive, 36, True);
        Set Global Variable At Index(skittleLocations, 37, Random Value In Array(Global Variable(locations)));
        Modify Global Variable(locations, Remove From Array By Value, Value In Array(Global Variable(skittleLocations), 37));
        Create Effect(All Players(All Teams), Orb, Red, Value In Array(Global Variable(skittleLocations), 37), 1, Visible To);
        Set Global Variable At Index(skittles, 37, Last Created Entity);
        Set Global Variable At Index(skittleIsActive, 37, True);
        Set Global Variable At Index(skittleLocations, 38, Random Value In Array(Global Variable(locations)));
        Modify Global Variable(locations, Remove From Array By Value, Value In Array(Global Variable(skittleLocations), 38));
        Create Effect(All Players(All Teams), Orb, Red, Value In Array(Global Variable(skittleLocations), 38), 1, Visible To);
        Set Global Variable At Index(skittles, 38, Last Created Entity);
        Set Global Variable At Index(skittleIsActive, 38, True);
        Set Global Variable At Index(skittleLocations, 39, Random Value In Array(Global Variable(locations)));
        Modify Global Variable(locations, Remove From Array By Value, Value In Array(Global Variable(skittleLocations), 39));
        Create Effect(All Players(All Teams), Orb, Red, Value In Array(Global Variable(skittleLocations), 39), 1, Visible To);
        Set Global Variable At Index(skittles, 39, Last Created Entity);
        Set Global Variable At Index(skittleIsActive, 39, True);
        Set Global Variable At Index(skittleLocations, 40, Random Value In Array(Global Variable(locations)));
        Modify Global Variable(locations, Remove From Array By Value, Value In Array(Global Variable(skittleLocations), 40));
        Create Effect(All Players(All Teams), Orb, White, Value In Array(Global Variable(skittleLocations), 40), 1, Visible To);
        Set Global Variable At Index(skittles, 40, Last Created Entity);
        Set Global Variable At Index(skittleIsActive, 40, True);
        Set Global Variable At Index(skittleLocations, 41, Random Value In Array(Global Variable(locations)));
        Modify Global Variable(locations, Remove From Array By Value, Value In Array(Global Variable(skittleLocations), 41));
        Create Effect(All Players(All Teams), Orb, White, Value In Array(Global Variable(skittleLocations), 41), 1, Visible To);
        Set Global Variable At Index(skittles, 41, Last Created Entity);
        Set Global Variable At Index(skittleIsActive, 41, True);
        Set Global Variable At Index(skittleLocations, 42, Random Value In Array(Global Variable(locations)));
        Modify Global Variable(locations, Remove From Array By Value, Value In Array(Global Variable(skittleLocations), 42));
        Create Effect(All Players(All Teams), Orb, White, Value In Array(Global Variable(skittleLocations), 42), 1, Visible To);
        Set Global Variable At Index(skittles, 42, Last Created Entity);
        Set Global Variable At Index(skittleIsActive, 42, True);
        Set Global Variable At Index(skittleLocations, 43, Random Value In Array(Global Variable(locations)));
        Modify Global Variable(locations, Remove From Array By Value, Value In Array(Global Variable(skittleLocations), 43));
        Create Effect(All Players(All Teams), Orb, White, Value In Array(Global Variable(skittleLocations), 43), 1, Visible To);
        Set Global Variable At Index(skittles, 43, Last Created Entity);
        Set Global Variable At Index(skittleIsActive, 43, True);
        Set Global Variable At Index(skittleLocations, 44, Random Value In Array(Global Variable(locations)));
        Modify Global Variable(locations, Remove From Array By Value, Value In Array(Global Variable(skittleLocations), 44));
        Create Effect(All Players(All Teams), Orb, White, Value In Array(Global Variable(skittleLocations), 44), 1, Visible To);
        Set Global Variable At Index(skittles, 44, Last Created Entity);
        Set Global Variable At Index(skittleIsActive, 44, True);
        Set Global Variable At Index(skittleLocations, 45, Random Value In Array(Global Variable(locations)));
        Modify Global Variable(locations, Remove From Array By Value, Value In Array(Global Variable(skittleLocations), 45));
        Create Effect(All Players(All Teams), Orb, White, Value In Array(Global Variable(skittleLocations), 45), 1, Visible To);
        Set Global Variable At Index(skittles, 45, Last Created Entity);
        Set Global Variable At Index(skittleIsActive, 45, True);
        Set Global Variable At Index(skittleLocations, 46, Random Value In Array(Global Variable(locations)));
        Modify Global Variable(locations, Remove From Array By Value, Value In Array(Global Variable(skittleLocations), 46));
        Create Effect(All Players(All Teams), Orb, White, Value In Array(Global Variable(skittleLocations), 46), 1, Visible To);
        Set Global Variable At Index(skittles, 46, Last Created Entity);
        Set Global Variable At Index(skittleIsActive, 46, True);
        Set Global Variable At Index(skittleLocations, 47, Random Value In Array(Global Variable(locations)));
        Modify Global Variable(locations, Remove From Array By Value, Value In Array(Global Variable(skittleLocations), 47));
        Create Effect(All Players(All Teams), Orb, White, Value In Array(Global Variable(skittleLocations), 47), 1, Visible To);
        Set Global Variable At Index(skittles, 47, Last Created Entity);
        Set Global Variable At Index(skittleIsActive, 47, True);
    }
}

rule ("Tell Player their skittle color") {
    event {
        Ongoing - Each Player;
        All;
        All;
    }

    actions {
        Set Player Variable(Event Player, pickedUpIndex, -1);
        Skip(Value In Array(Append To Array(Append To Array(Append To Array(Append To Array(Append To Array(Append To Array(Append To Array(Empty Array, 12), 1), 3), 5), 7), 9), 11), Add(1, Index Of Array Value(Append To Array(Append To Array(Append To Array(Append To Array(Append To Array(Append To Array(Empty Array, 0), 1), 2), 3), 4), 5), Slot Of(Event Player)))));
        disabled Abort;
        Create HUD Text(Event Player, Custom String("Your Skittle Color Is AQUA", Null, Null, Null), Null, Null, Top, 2, Aqua, White, White, String, Visible Never);
        Skip(9);
        Create HUD Text(Event Player, Custom String("Your Skittle Color Is GREEN", Null, Null, Null), Null, Null, Top, 2, Green, White, White, String, Visible Never);
        Skip(7);
        Create HUD Text(Event Player, Custom String("Your Skittle Color Is ORANGE", Null, Null, Null), Null, Null, Top, 2, Orange, White, White, String, Visible Never);
        Skip(5);
        Create HUD Text(Event Player, Custom String("Your Skittle Color Is PURPLE", Null, Null, Null), Null, Null, Top, 2, Purple, White, White, String, Visible Never);
        Skip(3);
        Create HUD Text(Event Player, Custom String("Your Skittle Color Is RED", Null, Null, Null), Null, Null, Top, 2, Red, White, White, String, Visible Never);
        Skip(1);
        Create HUD Text(Event Player, Custom String("Your Skittle Color Is WHITE", Null, Null, Null), Null, Null, Top, 2, White, White, White, String, Visible Never);
    }
}

rule ("Handle Skittle Interaction") {
    event {
        Ongoing - Each Player;
        All;
        All;
    }

    conditions {
        Is Button Held(Event Player, Interact) == True;
        Is True For Any(Filtered Array(Array Slice(Global Variable(skittleLocations), Multiply(8, Slot Of(Event Player)), 8), Value In Array(Global Variable(skittleIsActive), Index Of Array Value(Global Variable(skittleLocations), Current Array Element))), Compare(Distance Between(Position Of(Event Player), Current Array Element), <, 2)) == True;
    }

    actions {
        Skip If(Not(Compare(Player Variable(Event Player, pickedUpIndex), ==, -1)), 6);
        Set Player Variable(Event Player, pickedUpIndex, Index Of Array Value(Global Variable(skittleLocations), First Of(Sorted Array(Filtered Array(Array Slice(Global Variable(skittleLocations), Multiply(8, Slot Of(Event Player)), 8), Value In Array(Global Variable(skittleIsActive), Index Of Array Value(Global Variable(skittleLocations), Current Array Element))), Distance Between(Position Of(Event Player), Current Array Element)))));
        Big Message(Event Player, Custom String("Picked up a skittle!", Null, Null, Null));
        Play Effect(Event Player, Buff Explosion Sound, White, Position Of(Event Player), 100);
        Set Global Variable At Index(skittleIsActive, Player Variable(Event Player, pickedUpIndex), False);
        Destroy Effect(Value In Array(Global Variable(skittles), Player Variable(Event Player, pickedUpIndex)));
        Skip(7);
        Set Player Variable(Event Player, pickedUpIndex, Index Of Array Value(Global Variable(skittleLocations), First Of(Sorted Array(Filtered Array(Array Slice(Global Variable(skittleLocations), Multiply(8, Slot Of(Event Player)), 8), Value In Array(Global Variable(skittleIsActive), Index Of Array Value(Global Variable(skittleLocations), Current Array Element))), Distance Between(Position Of(Event Player), Current Array Element)))));
        Big Message(Event Player, Custom String("Reunited two skittles!", Null, Null, Null));
        Play Effect(Event Player, Buff Impact Sound, White, Position Of(Event Player), 100);
        Modify Player Score(Event Player, 1);
        Set Global Variable At Index(skittleIsActive, Player Variable(Event Player, pickedUpIndex), False);
        Destroy Effect(Value In Array(Global Variable(skittles), Player Variable(Event Player, pickedUpIndex)));
        Set Player Variable(Event Player, pickedUpIndex, -1);
    }
}

rule ("DEBUG: Insert locations") {
    event {
        Ongoing - Each Player;
        All;
        All;
    }

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

    actions {
        Skip If(Not(Is Crouching(Event Player)), 3);
        Big Message(Event Player, Custom String("Removing last location", Null, Null, Null));
        Modify Global Variable(locations, Remove From Array By Index, Subtract(Count Of(Global Variable(locations)), 1));
        Skip(3);
        Big Message(Event Player, Custom String("Adding location", Null, Null, Null));
        Create Effect(All Players(All Teams), Orb, Green, Position Of(Event Player), 1, None);
        Modify Global Variable(locations, Append To Array, Position Of(Event Player));
    }
}