Return to post
- settings
- {
- main
- {
- Description: "Andy's Bumpercars beta release V1 - code: AND2Y | www.workshop.codes/bumpercars | @andygmb1 on twitter |"
- }
- lobby
- {
- Allow Players Who Are In Queue: Yes
- Max FFA Players: 10
- Max Spectators: 12
- Return To Lobby: Never
- }
- modes
- {
- Deathmatch
- {
- Game Length In Minutes: 15
- Score To Win: 100
- Self Initiated Respawn: Off
- enabled maps
- {
- Workshop Island Night
- }
- }
- General
- {
- Allow Hero Switching: Off
- Game Mode Start: Immediately
- Hero Limit: Off
- Respawn As Random Hero: On
- Respawn Time Scalar: 10%
- }
- }
- heroes
- {
- General
- {
- Wrecking Ball
- {
- Ammunition Clip Size Scalar: 25%
- Grappling Claw: Off
- Health: 10%
- Piledriver: Off
- Primary Fire: Off
- Ultimate Duration: 70%
- Ultimate Generation - Combat Minefield: 500%
- Ultimate Generation - Passive Minefield: 0%
- Ultimate Generation Minefield: 10%
- }
- enabled heroes
- {
- Wrecking Ball
- }
- }
- }
- }
- variables
- {
- global:
- 2: wall_bounce_multiplier
- 3: bouncy_walls_enabled
- 4: speedboost_cooldown
- 5: speedboost_amount
- 6: bots_enabled
- 7: ring_sizes_animated
- 8: ring_sizes_static
- 9: bot_usernames
- 10: colors
- 11: rings_iter
- 12: iter
- player:
- 1: camera_pos
- 2: car_pos
- 3: hit_car
- 4: last_hit_car
- 5: hit_wall
- 6: boost_available
- 7: player_effects_array
- 8: car_size
- 9: ring_colors
- 10: colortype
- 11: dummy_bot_facing
- 12: animation_type
- 13: ring_color_index
- }
- subroutines
- {
- 0: new_ring_effect_array
- }
- rule("Initial Global")
- {
- event
- {
- Ongoing - Global;
- }
- actions
- {
- Global.wall_bounce_multiplier = 1;
- Global.bouncy_walls_enabled = False;
- Global.speedboost_cooldown = 1.500;
- Global.speedboost_amount = 35;
- Global.bots_enabled = True;
- Global.ring_sizes_animated = Array(0.300, 0.400, 0.500, 0.600, 0.700, 0.800, 0.900);
- Global.ring_sizes_static = Array(0.700, 0.800, 0.900, 1, 1.100, 1.200, 1.300);
- Global.bot_usernames = Array(Custom String("Darwin"), Custom String("alplay"), Custom String("andygmb"), Custom String("andy"),
- Custom String("Connlocks"), Custom String("Frosty"), Custom String("iruk4nj1"), Custom String("Jay"), Custom String("Mitsiee"),
- Custom String("Neal"), Custom String("Robertface"), Custom String("Steffan"), Custom String("hanafuda"), Custom String(
- "Hatti"), Custom String("kalrirr"), Custom String("Liam"), Custom String("MitchMan"), Custom String("MrMarmite"),
- Custom String("NEXZ"), Custom String("Ropesy"), Custom String("SKIPAH"), Custom String("Soapwood"), Custom String("Teapot06"),
- Custom String("TFez"), Custom String("tigole bitties"), Custom String("jeffrey kaplan"), Custom String("Geoff Goodman"),
- Custom String("Zach Metcalf"), Custom String("Dan Reed"), Custom String("Keith Miron"), Custom String("Derek Mulder"),
- Custom String("Liam Neeson"), Custom String("Michael D. Higgins"), Custom String("Oscar Wilde"), Custom String(
- "Sonia O’Sullivan"), Custom String("Graham Norton"), Custom String("Enya"), Custom String("Michael Fassbender"), Custom String(
- "Dolores O’Riordan"), Custom String("Pierce Brosnan"), Custom String("Dara O’Briain"));
- Global.colors = Array(Color(Aqua), Color(Black), Color(Blue), Color(Green), Color(Lime Green), Color(Orange), Color(Purple), Color(
- Red), Color(Rose), Color(Sky Blue), Color(Turquoise), Color(Violet), Color(White), Color(Yellow));
- }
- }
- rule("Initial Player")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- actions
- {
- Event Player.camera_pos = Vector(Empty Array, 3.500, -2.500);
- Event Player.car_pos = Vector(Empty Array, 6, -0.300);
- Event Player.hit_wall = False;
- Event Player.boost_available = False;
- Event Player.car_size = 1.500;
- Event Player.ring_colors = Array(Color(Red), Color(Orange), Color(Yellow), Color(Green), Color(Blue), Color(Purple), Color(Rose));
Event Player.colortype = Random Integer(0, Count Of(Global.colors) + 1);
- Event Player.colortype = Random Integer(-2, Count Of(Global.colors) + 1);
- Event Player.animation_type = Custom String("static");
- }
- }
- rule("Setup lava")
- {
- event
- {
- Ongoing - Global;
- }
- actions
- {
- Create Effect(All Players(All Teams), Cloud, Color(Orange), Vector(25, -15, Empty Array), 200, Visible To Position and Radius);
- Create Effect(All Players(All Teams), Cloud, Color(Red), Vector(-25, -15, Empty Array), 200, Visible To Position and Radius);
- Create Effect(All Players(All Teams), Sphere, Color(Red), Vector(-20, -199.800, 20), 200, Visible To Position and Radius);
- Create Effect(All Players(All Teams), Sphere, Color(Red), Vector(-20, -199.800, -20), 200, Visible To Position and Radius);
- Create Effect(All Players(All Teams), Sphere, Color(Red), Vector(20, -199.800, 20), 200, Visible To Position and Radius);
- Create Effect(All Players(All Teams), Sphere, Color(Red), Vector(20, -199.800, -20), 200, Visible To Position and Radius);
- Create Effect(All Players(All Teams), Sphere, Color(Red), Vector(Empty Array, -25, Empty Array), 50,
- Visible To Position and Radius);
- }
- }
- rule("new_ring_effect_array subroutine")
- {
- event
- {
- Subroutine;
- new_ring_effect_array;
- }
- actions
- {
- While(Count Of(Event Player.player_effects_array) > 0);
- Destroy Effect(Event Player.player_effects_array[0]);
- Modify Player Variable(Event Player, player_effects_array, Remove From Array By Index, 0);
- Wait(0.016, Ignore Condition);
- End;
- Event Player.player_effects_array = Empty Array;
- Global.rings_iter = 0;
- While(Global.rings_iter < Count Of(Event Player.ring_colors));
- If(Event Player.animation_type == Custom String("animated"));
- Create Effect(Is Dead(Event Player) ? False : All Players(All Teams), Ring, Event Player.ring_colors[Evaluate Once(
- Global.rings_iter)], Event Player, Global.ring_sizes_animated[Evaluate Once(Global.rings_iter)],
- Visible To Position and Radius);
- End;
- If(Event Player.animation_type == Custom String("static"));
- Create Effect(Is Dead(Event Player) ? False : All Players(All Teams), Ring, Event Player.ring_colors[Evaluate Once(
- Global.rings_iter)], Event Player, Global.ring_sizes_static[Evaluate Once(Global.rings_iter)], Visible To Position and Radius);
- End;
- Modify Player Variable(Event Player, player_effects_array, Append To Array, Last Created Entity);
- Global.rings_iter += 1;
- End;
- }
- }
- rule("Setup Player")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- actions
- {
- Disallow Button(Event Player, Button(Ability 1));
- Wait(Random Real(0, 1), Ignore Condition);
If(Event Player.colortype != 0);
- If(Event Player.colortype > 0);
- Event Player.ring_color_index = 0;
- While(Event Player.ring_color_index < Count Of(Event Player.ring_colors));
- Event Player.ring_colors[Event Player.ring_color_index] = Global.colors[Event Player.colortype];
- Event Player.ring_color_index += 1;
- End;
- End;
- If(Event Player.colortype == -1);
- Event Player.ring_colors = Array(Color(Sky Blue), Color(Rose), Color(White), Color(White), Color(Rose), Color(Sky Blue), Color(
- Sky Blue));
- End;
- If(Event Player.colortype == -2);
- Event Player.ring_colors = Array(Color(Orange), Color(Orange), Color(White), Color(White), Color(Green), Color(Green), Color(
- Green));
- End;
- Call Subroutine(new_ring_effect_array);
- }
- }
- rule("Game in progress, enable boost")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
- Is Game In Progress == True;
- }
- actions
- {
- Event Player.boost_available = True;
- }
- }
- rule("Create Dummy bots if less than 24 players")
- {
- event
- {
- Ongoing - Global;
- }
- conditions
- {
- Global.bots_enabled == True;
(Count Of(All Players(All Teams)) < 12 && Global.bots_enabled == True) == True;
- (Count Of(All Players(All Teams)) < 23 && Global.bots_enabled == True) == True;
- }
- actions
- {
- Create Dummy Bot(Hero(Wrecking Ball), All Teams, -1, Left - Left, Left - Left);
Wait(0.016, Ignore Condition);
- Wait(0.064, Ignore Condition);
- Loop If Condition Is True;
- }
- }
- rule("Animate ring effects")
- {
- event
- {
- Ongoing - Global;
- }
- actions
- {
- Global.iter = 0;
- While(Global.iter < Count Of(Global.ring_sizes_animated));
- If(Global.ring_sizes_animated[Global.iter] <= 1);
- Global.ring_sizes_animated[Global.iter] = Global.ring_sizes_animated[Global.iter] + 0.050;
- Else;
- Global.ring_sizes_animated[Global.iter] = 0;
- End;
- Global.iter += 1;
- End;
- Wait(0.048, Ignore Condition);
- Loop;
- }
- }
- rule("Player spawned and is ingame, setup camera and such")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
- Hero Of(Event Player) == Hero(Wrecking Ball);
- Is Alive(Event Player) == True;
- Is Dead(Event Player) == False;
- Has Spawned(Event Player) == True;
- }
- actions
- {
- Start Camera(Event Player, World Vector Of(Event Player.camera_pos, Event Player, Rotation And Translation), World Vector Of(
- Event Player.camera_pos, Event Player, Rotation And Translation) + Facing Direction Of(Event Player) * 800, 90);
- Disable Movement Collision With Players(Event Player);
- Disable Movement Collision With Environment(Event Player, True);
- Start Scaling Player(Event Player, Event Player.car_size, True);
- Teleport(Event Player, Vector(Random Integer(-17, 17), -2.234, Random Integer(-17, 17)));
- Set Gravity(Event Player, 0);
- Apply Impulse(Event Player, Up, 0.001, To Player, Cancel Contrary Motion);
- If(Is Dummy Bot(Event Player));
- Event Player.dummy_bot_facing = Direction Towards(Position Of(Event Player) * Vector(1, Empty Array, 1), Vector(Random Integer(-17,
- 17), Empty Array, Random Integer(-17, 17)));
- Start Facing(Event Player, Event Player.dummy_bot_facing, 360, To World, Direction and Turn Rate);
- End;
- Remove All Health Pools From Player(Event Player);
- Set Max Health(Event Player, 1);
- Add Health Pool To Player(Event Player, Shields, 5, True, True);
- Add Health Pool To Player(Event Player, Armor, 4, True, True);
- Add Health Pool To Player(Event Player, Health, 5, False, True);
- Add Health Pool To Player(Event Player, Shields, 5, False, True);
- Add Health Pool To Player(Event Player, Armor, 5, False, True);
- }
- }
- rule("Wall detection and bouncing back")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
- Global.bouncy_walls_enabled == True;
- (X Component Of(Position Of(Event Player) + Normalize(Velocity Of(Event Player)) * 0.500) >= 18.500 || X Component Of(Position Of(
- Event Player) + Normalize(Velocity Of(Event Player)) * 0.500) <= -18.500 || Z Component Of(Position Of(Event Player)
- + Normalize(Velocity Of(Event Player)) * 0.500) >= 18.500 || Z Component Of(Position Of(Event Player) + Normalize(Velocity Of(
- Event Player)) * 0.500) <= -18.500) == True;
- }
- actions
- {
- If(X Component Of(Position Of(Event Player) + Normalize(Velocity Of(Event Player)) * 0.500) >= 18.500);
- Apply Impulse(Event Player, Right, 0.001, To World, Cancel Contrary Motion);
- Apply Impulse(Event Player, (Normalize(Velocity Of(Event Player)) - 2 * Dot Product(Normalize(Velocity Of(Event Player)), Right)
- * Right) * Vector(1, Empty Array, 1), Speed Of(Event Player) * Global.wall_bounce_multiplier, To World,
- Cancel Contrary Motion);
- End;
- If(X Component Of(Position Of(Event Player) + Normalize(Velocity Of(Event Player)) * 0.500) <= -18.500);
- Apply Impulse(Event Player, Left, 0.001, To World, Cancel Contrary Motion);
- Apply Impulse(Event Player, (Normalize(Velocity Of(Event Player)) - 2 * Dot Product(Normalize(Velocity Of(Event Player)), Left)
- * Left) * Vector(1, Empty Array, 1), Speed Of(Event Player) * Global.wall_bounce_multiplier, To World, Cancel Contrary Motion);
- End;
- If(Z Component Of(Position Of(Event Player) + Normalize(Velocity Of(Event Player)) * 0.500) >= 18.500);
- Apply Impulse(Event Player, Backward, 0.001, To World, Cancel Contrary Motion);
- Apply Impulse(Event Player, (Normalize(Velocity Of(Event Player)) - 2 * Dot Product(Normalize(Velocity Of(Event Player)), Backward)
- * Backward) * Vector(1, Empty Array, 1), Speed Of(Event Player) * Global.wall_bounce_multiplier, To World,
- Cancel Contrary Motion);
- End;
- If(Z Component Of(Position Of(Event Player) + Normalize(Velocity Of(Event Player)) * 0.500) <= -18.500);
- Apply Impulse(Event Player, Forward, 0.001, To World, Cancel Contrary Motion);
- Apply Impulse(Event Player, (Normalize(Velocity Of(Event Player)) - 2 * Dot Product(Normalize(Velocity Of(Event Player)), Forward)
- * Forward) * Vector(1, Empty Array, 1), Speed Of(Event Player) * Global.wall_bounce_multiplier, To World,
- Cancel Contrary Motion);
- End;
- If(!Event Player.hit_wall);
- Play Effect(Event Player, Debuff Impact Sound, Color(White), Event Player, 100);
- Event Player.hit_wall = True;
- End;
- Wait(0.016, Ignore Condition);
- Loop If Condition Is True;
- Event Player.hit_wall = False;
- }
- }
- rule("Lava detection")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
- Global.bouncy_walls_enabled == False;
- (X Component Of(Position Of(Event Player) + Normalize(Velocity Of(Event Player)) * 0.500) >= 20.500 || X Component Of(Position Of(
- Event Player) + Normalize(Velocity Of(Event Player)) * 0.500) <= -20.500 || Z Component Of(Position Of(Event Player)
- + Normalize(Velocity Of(Event Player)) * 0.500) >= 20.500 || Z Component Of(Position Of(Event Player) + Normalize(Velocity Of(
- Event Player)) * 0.500) <= -20.500) == True;
- }
- actions
- {
- Kill(Event Player, Event Player.hit_car);
- }
- }
- rule("Bouncy Wall visuals")
- {
- event
- {
- Ongoing - Global;
- }
- conditions
- {
- Global.bouncy_walls_enabled == True;
- }
- actions
- {
- Create Beam Effect(All Players(All Teams), Good Beam, Vector(-20, 0.500, 20), Vector(20, 0.500, 20), Color(Sky Blue), Visible To);
- Create Beam Effect(All Players(All Teams), Good Beam, Vector(-20, 0.500, -20), Vector(20, 0.500, -20), Color(Sky Blue),
- Visible To);
- Create Beam Effect(All Players(All Teams), Good Beam, Vector(-20, 0.500, -20), Vector(-20, 0.500, 20), Color(Sky Blue),
- Visible To);
- Create Beam Effect(All Players(All Teams), Good Beam, Vector(20, 0.500, 20), Vector(20, 0.500, -20), Color(Sky Blue), Visible To);
- }
- }
- rule("Dummy bots go brrr")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
- Is Dummy Bot(Event Player) == True;
- }
- actions
- {
- Start Throttle In Direction(Event Player, Facing Direction Of(Event Player), 1, To World, Add to existing throttle,
- Direction and Magnitude);
- While(True);
- Event Player.dummy_bot_facing = Vector(Random Integer(-1, 1), Empty Array, Random Integer(-1, 1));
- Wait(Random Integer(0, 0.500), Ignore Condition);
- End;
- }
- }
- rule("Dummy bots aim back to the center if they move out of 17 radius")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
- Is Dummy Bot(Event Player) == True;
- Array Contains(Players Within Radius(Vector(Empty Array, -4, Empty Array), 15, All Teams, Off), Event Player) == False;
- }
- actions
- {
- Event Player.dummy_bot_facing = Direction Towards(Position Of(Event Player) * Vector(1, Empty Array, 1), Vector(Random Integer(-17,
- 17), Empty Array, Random Integer(-17, 17)));
- If(Random Integer(0, 1) == 0);
- Wait(0.500, Ignore Condition);
- Press Button(Event Player, Button(Ability 1));
- End;
- Wait(0.250, Ignore Condition);
- Loop If Condition Is True;
- }
- }
- disabled rule("If somehow you got into ball mode, get out")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
- Hero Of(Event Player) == Hero(Wrecking Ball);
- Has Spawned(Event Player) == True;
- Is Alive(Event Player) == True;
- Is Using Ability 1(Event Player) == True;
- }
- actions
- {
- Wait(1, Ignore Condition);
- Set Ability 1 Enabled(Event Player, True);
- Press Button(Event Player, Button(Ability 1));
- Set Ability 1 Enabled(Event Player, False);
- }
- }
- rule("Player Hit Detection")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
- Has Spawned(Event Player) == True;
- Is Alive(Event Player) == True;
- Is True For Any(Remove From Array(All Living Players(All Teams), Event Player), Distance Between(Event Player,
- Current Array Element) <= 1.500) == True;
- }
- actions
- {
- Play Effect(All Players(All Teams), Ring Explosion, First Of(Event Player.ring_colors), Position Of(Event Player) * Vector(1,
- Empty Array, 1), Speed Of(Event Player) / 5);
- Event Player.hit_car = Sorted Array(Filtered Array(Remove From Array(All Living Players(All Teams), 0),
- Current Array Element != Event Player && Distance Between(Event Player, Current Array Element) <= 1.500), Distance Between(
- Event Player, Current Array Element));
- If(Event Player.hit_car != Event Player.last_hit_car);
- Apply Impulse(Event Player, Direction Towards(Position Of(Event Player.hit_car), Position Of(Event Player)) * Vector(1,
- Empty Array, 1), Speed Of In Direction(Event Player, Direction Towards(Event Player, Event Player.hit_car))
- + Speed Of In Direction(Event Player.hit_car, Direction Towards(Event Player.hit_car, Event Player)) * 2.500, To World,
- Incorporate Contrary Motion);
- Play Effect(Event Player, Buff Impact Sound, Color(White), Event Player, 100);
- End;
- Event Player.last_hit_car = Event Player.hit_car;
- Wait(0.300, Ignore Condition);
- Event Player.last_hit_car = Null;
- }
- }
- rule("Boost pressed while cooldown free")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
- Is Button Held(Event Player, Button(Ability 1)) == True;
- Event Player.boost_available == True;
- Is Alive(Event Player) == True;
- }
- actions
- {
- Event Player.boost_available = False;
- Apply Impulse(Event Player, Normalize(Facing Direction Of(Event Player)) * Vector(1, Empty Array, 1), Global.speedboost_amount,
- To World, Incorporate Contrary Motion);
- Play Effect(Event Player, Bad Pickup Effect, Color(Lime Green), Event Player, 0.200);
- Play Effect(Event Player, Buff Impact Sound, Color(White), Position Of(Event Player) * Vector(1, Empty Array, 1), 100);
- Wait(Global.speedboost_cooldown, Ignore Condition);
- Event Player.boost_available = True;
- }
- }
- rule("Boost pressed while cooldown not available")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
- Is Button Held(Event Player, Button(Ability 1)) == True;
- !Event Player.boost_available == True;
- }
- actions
- {
- Small Message(Event Player, Custom String("{0} {1} {2} ", Ability Icon String(Hero(Soldier: 76), Button(Ability 1)), String("On"),
- String("Cooldown")));
- Play Effect(Event Player, Debuff Impact Sound, Color(White), Event Player, 10);
- Wait(0.300, Ignore Condition);
- }
- }
- rule("using ult, scale down for a second so bombs glitch into floor")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
- Is Using Ultimate(Event Player) == True;
- }
- actions
- {
- Wait(0.050, Ignore Condition);
- Event Player.car_size = 1;
- Wait(0.200, Ignore Condition);
- Event Player.car_size = 1.500;
- }
- }
- rule("Hud Text for code")
- {
- event
- {
- Ongoing - Global;
- }
- actions
- {
- Create HUD Text(All Players(All Teams), Custom String("Andy's Hammond Bumper cars \n Code: AND2Y "), Null,
- Null, Top, 0, Custom Color(127.500 * (True + Cosine From Degrees(180 * Sine From Radians(Total Time Elapsed))), 127.500 * (
- True + Cosine From Degrees(180 * Sine From Radians(2.094 + Total Time Elapsed))), 127.500 * (True + Cosine From Degrees(
- 180 * Sine From Radians(1.050 + Total Time Elapsed))), 254), Color(Black), Color(Black),
- Visible To Sort Order String and Color, Default Visibility);
- }
- }