Create
Return to post

Comparing difference between and

View raw
  • settings
  • {
  • main
  • {
  • Description: "The classic playground game, in terms of Lucio wallriding. (By nobody#1774.)"
  • }
  • lobby
  • {
  • Allow Players Who Are In Queue: Yes
  • Map Rotation: After A Game
  • Match Voice Chat: Enabled
  • Max Spectators: 12
  • Return To Lobby: Never
  • }
  • modes
  • {
  • Deathmatch
  • {
  • enabled maps
  • disabled maps
  • {
  • Black Forest
  • Blizzard World
  • Castillo
  • Château Guillard
  • Dorado
  • Eichenwalde
  • Hollywood
  • Ilios Lighthouse
  • Ilios Ruins
  • Ilios Well
  • Necropolis
  • Oasis City Center
  • Oasis Gardens
  • Oasis University
  • Paris
  • Petra
  • Temple of Anubis
  • Workshop Chamber
  • Workshop Expanse
  • Workshop Expanse Night
  • Workshop Island
  • Workshop Island Night
  • }
  • }
  • General
  • {
  • Allow Hero Switching: Off
  • Enemy Health Bars: Off
  • Game Mode Start: Immediately
  • Hero Limit: Off
  • Respawn As Random Hero: On
  • Respawn Time Scalar: 0%
  • Score To Win: 50
  • }
  • }
  • heroes
  • {
  • General
  • {
  • Primary Fire: Off
  • Quick Melee: Off
  • Ultimate Ability: Off
  • Lúcio
  • {
  • Primary Fire: Off
  • Quick Melee: Off
  • Soundwave: Off
  • Ultimate Ability Sound Barrier: Off
  • }
  • enabled heroes
  • {
  • Lúcio
  • }
  • }
  • }
  • }
  • variables
  • {
  • global:
  • 0: VECTORS_EFFECTS_Checkpoints
  • 1: PLAYER_Leader
  • 2: BOOL_Turn_Ended
  • 3: PLAYERS_All
  • 5: INT_Checkpoints_Completed
  • 6: VECTOR_Temp
  • 7: PLAYER_Follower
  • 8: PLAYERS_Tried_This_Round
  • 9: REAL_Checkpoint_Radius
  • 10: EFFECT_Current_Checkpoint
  • 11: EFFECT_Current_Checkpoint_2
  • 12: INT_Course_Min_Checkpoints
  • 15: REAL_Time_Remaining
  • 16: REAL_Course_Time_Limit
  • 17: REAL_Allowed_Delay_Seconds
  • 18: REAL_Checkpoint_Radius_Factor
  • 20: REAL_Checkpoint_Min_Separation
  • 21: PLAYER_Of_Interest
  • player:
  • 0: INT_Times_Leader
  • 1: BOOL_Ready
  • 2: BOOL_Started
  • 3: BOOL_Finished
  • }
  • subroutines
  • {
  • 0: ROUND_Next
  • 1: CHECKPOINT_Record
  • 2: TURN_Next
  • 4: FOLLOWER_Checkpoint
  • }
  • rule("CREDITS")
  • {
  • event
  • {
  • Player Joined Match;
  • All;
  • All;
  • }
  • actions
  • {
  • Wait(5, Ignore Condition);
  • Small Message(Event Player, Custom String("Thanks to these playtesters:"));
  • Small Message(Event Player, Custom String("OGGamerTag, DPSFrog, Zrizzt, Pheonix050"));
  • Small Message(Event Player, Custom String("Jakesicle, XFacts, Creepercomix, Aurorus"));
  • Small Message(Event Player, Custom String("BluePhoenix, Spiralgaster, Teradeus"));
  • }
  • }
  • rule("DEBUG: Next round")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Event Player == Host Player;
  • Is Button Held(Event Player, Interact) == True;
  • Is Button Held(Event Player, Primary Fire) == True;
  • }
  • actions
  • {
  • Call Subroutine(ROUND_Next);
  • }
  • }
  • rule("INIT")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • actions
  • {
  • Disable Built-In Game Mode Announcer;
  • Disable Built-In Game Mode Completion;
  • Disable Built-In Game Mode Scoring;
  • "Initialize variables."
  • Global.REAL_Checkpoint_Radius = Workshop Setting Real(Custom String("Lucio HORSE (Competitive Wallriding)"), Custom String(
  • "Checkpoint radius (meters)"), 1, 0.500, 5);
  • Global.REAL_Checkpoint_Radius_Factor = Workshop Setting Real(Custom String("Lucio HORSE (Competitive Wallriding)"), Custom String(
  • "Checkpoint radius hitbox multiplier"), 1.500, 1, 5);
  • Global.INT_Course_Min_Checkpoints = Workshop Setting Integer(Custom String("Lucio HORSE (Competitive Wallriding)"), Custom String(
  • "Course minimum checkpoints"), 2, 1, 10);
  • Global.REAL_Course_Time_Limit = Workshop Setting Real(Custom String("Lucio HORSE (Competitive Wallriding)"), Custom String(
  • "Course length limit (seconds)"), 10, 5, 30);
  • Global.REAL_Allowed_Delay_Seconds = Workshop Setting Real(Custom String("Lucio HORSE (Competitive Wallriding)"), Custom String(
  • "Player turn start timeout (seconds)"), 30, 5, 60);
  • Global.REAL_Checkpoint_Min_Separation = 2;
  • "HUD"
  • Create HUD Text(Global.PLAYERS_All, Custom String("BEGIN TURN"), Custom String("When it's your turn"), Custom String("Press: {0}",
  • Input Binding String(Button(Interact))), Right, 0, White, Turquoise, White, Visible To and String, Default Visibility);
  • Create HUD Text(Global.PLAYERS_All, Custom String("CHECKPOINTS"), Custom String("Completed"), String("{0} / {1}",
  • Global.INT_Checkpoints_Completed, Count Of(Global.VECTORS_EFFECTS_Checkpoints)), Left, 0, White, Turquoise, White,
  • Visible To and String, Default Visibility);
  • Create HUD Text(Global.PLAYERS_All, Custom String("LEADER"), Custom String("Lays out course"), Global.PLAYER_Leader, Left, 0,
  • White, Turquoise, White, Visible To and String, Default Visibility);
  • Create HUD Text(Global.PLAYERS_All, Custom String("FOLLOWER"), Custom String("Follows course"), Global.PLAYER_Follower, Left, 0,
  • White, Turquoise, White, Visible To and String, Default Visibility);
  • Create HUD Text(Global.PLAYERS_All, Custom String("TELEPORT"), Custom String("To checkpoint #1"), Custom String("Press: {0}",
  • Input Binding String(Button(Reload))), Right, 0, White, Turquoise, White, Visible To and String, Default Visibility);
  • Create HUD Text(Global.PLAYERS_All, Custom String("SHARE CODE"), Custom String("https://workshop.codes/lucio-horse"),
  • Custom String("N64RV"), Left, -1, White, Turquoise, White, Visible To and String, Default Visibility);
  • "Effects."
  • Create Effect(Global.PLAYERS_All, Bad Aura, Green, Global.PLAYER_Leader, 0.500, Visible To Position and Radius);
  • Create Effect(Global.PLAYERS_All, Good Aura, Green, Global.PLAYER_Follower, 0.500, Visible To Position and Radius);
  • Create Icon(Global.PLAYERS_All, Global.PLAYER_Of_Interest, Flag, Visible To and Position, Green, True);
  • "Objectives (IIUC these only need to be set once, and reevaluation will update them)."
  • Set Objective Description(Global.PLAYER_Leader, Custom String("You're the Leader: wallride a course for others to follow"),
  • Visible To and String);
  • Set Objective Description(Filtered Array(All Players(All Teams), Current Array Element != Global.PLAYER_Follower), Custom String(
  • Set Objective Description(Filtered Array(All Players(All Teams), Current Array Element != Global.PLAYER_Leader), Custom String(
  • "You're a Follower: when it's your turn, follow the marked path"), Visible To and String);
  • "Avoid initial race condition."
  • Global.REAL_Time_Remaining = 99;
  • }
  • }
  • rule("PLAYER: Joins")
  • {
  • event
  • {
  • Player Joined Match;
  • All;
  • All;
  • }
  • actions
  • {
  • Global.PLAYERS_All = All Players(All Teams);
  • Event Player.INT_Times_Leader = 0;
  • Set Status(Event Player, Null, Phased Out, 9999);
  • }
  • }
  • rule("PLAYER: Leaves")
  • {
  • event
  • {
  • Player Left Match;
  • All;
  • All;
  • }
  • actions
  • {
  • "Player who left was it: start new round."
  • If(!Entity Exists(Global.PLAYER_Leader));
  • Small Message(All Players(All Teams), Custom String("Leader left. Next round..."));
  • Call Subroutine(ROUND_Next);
  • "Player who left was current follower: next turn."
  • Else If(Global.PLAYER_Follower != Null && !Entity Exists(Global.PLAYER_Follower));
  • Small Message(All Players(All Teams), Custom String("Follower left. Next turn..."));
  • Call Subroutine(TURN_Next);
  • End;
  • }
  • }
  • rule("GLOBAL: Game begins")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • (Is Game In Progress == True || Current Game Mode == Game Mode(Skirmish)) == True;
  • Count Of(All Players(All Teams)) > 0;
  • }
  • actions
  • {
  • "Wait for deathmatch \"countdown\" phase to end. Otherwise, setting the match time might cause players to be stuck, immobilized, in the countdown phase."
  • Wait(5, Ignore Condition);
  • Call Subroutine(ROUND_Next);
  • }
  • }
  • rule("PLAYER: Leader dies (Leader forfeits turn if course not already laid out.)")
  • {
  • event
  • {
  • Player Died;
  • All;
  • All;
  • }
  • conditions
  • {
  • Event Player == Global.PLAYER_Leader;
  • Event Player.BOOL_Started == True;
  • Event Player.BOOL_Finished == False;
  • }
  • actions
  • {
  • Small Message(All Players(All Teams), Custom String("{0} died while laying out course. Turn forfeited.", Global.PLAYER_Leader));
  • Wait(0.250, Ignore Condition);
  • Call Subroutine(ROUND_Next);
  • }
  • }
  • rule("GLOBAL: Leader times out before starting course")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Global.PLAYER_Leader.BOOL_Started == False;
  • disabled Global.REAL_Time_Remaining == 0;
  • Match Time == 0;
  • }
  • actions
  • {
  • Pause Match Time;
  • Set Match Time(Global.REAL_Allowed_Delay_Seconds);
  • Small Message(All Players(All Teams), Custom String("{0} took too long to start laying out course", Global.PLAYER_Leader));
  • Wait(0.250, Ignore Condition);
  • Call Subroutine(ROUND_Next);
  • }
  • }
  • rule("GLOBAL: Leader declares ready")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Global.PLAYER_Leader.BOOL_Ready == False;
  • Global.PLAYER_Leader.BOOL_Started == False;
  • Is Button Held(Global.PLAYER_Leader, Interact) == True;
  • }
  • actions
  • {
  • Global.PLAYER_Leader.BOOL_Ready = True;
  • Small Message(All Players(All Teams), Custom String("{0} is laying out new course", Global.PLAYER_Leader));
  • Destroy All Effects;
  • Destroy All In-World Text;
  • Create Effect(Global.PLAYERS_All, Bad Aura, Green, Global.PLAYER_Leader, 0.500, Visible To Position and Radius);
  • }
  • }
  • rule("GLOBAL: Leader attaches for first time, beginning turn")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Global.PLAYER_Leader.BOOL_Ready == True;
  • Global.PLAYER_Leader.BOOL_Started == False;
  • Is On Wall(Global.PLAYER_Leader) == True;
  • }
  • actions
  • {
  • Global.PLAYER_Leader.BOOL_Started = True;
  • disabled Global.REAL_Time_Remaining = Global.REAL_Course_Time_Limit;
  • disabled Chase Global Variable At Rate(REAL_Time_Remaining, 0, 1, Destination and Rate);
  • Set Match Time(Global.REAL_Course_Time_Limit);
  • }
  • }
  • rule("GLOBAL: Leader attached to wall")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Global.PLAYER_Leader.BOOL_Started == True;
  • Global.PLAYER_Leader.BOOL_Finished == False;
  • Is On Wall(Global.PLAYER_Leader) == True;
  • }
  • actions
  • {
  • Call Subroutine(CHECKPOINT_Record);
  • }
  • }
  • rule("GLOBAL: Leader detached from wall")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Global.PLAYER_Leader.BOOL_Started == True;
  • Global.PLAYER_Leader.BOOL_Finished == False;
  • Is On Wall(Global.PLAYER_Leader) == False;
  • }
  • actions
  • {
  • Call Subroutine(CHECKPOINT_Record);
  • }
  • }
  • rule("GLOBAL: Leader finished")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Global.PLAYER_Leader.BOOL_Started == True;
  • Global.PLAYER_Leader.BOOL_Finished == False;
  • Is On Ground(Global.PLAYER_Leader) == True;
  • }
  • actions
  • {
  • Pause Match Time;
  • Set Match Time(Global.REAL_Allowed_Delay_Seconds);
  • Global.PLAYER_Leader.BOOL_Finished = True;
  • Small Message(All Players(All Teams), Custom String("{0} laid out new course", Global.PLAYER_Leader));
  • Wait(0.250, Ignore Condition);
  • Call Subroutine(TURN_Next);
  • If(Count Of(Global.VECTORS_EFFECTS_Checkpoints) >= Global.INT_Course_Min_Checkpoints);
  • Small Message(All Players(All Teams), Custom String("{0} laid out new course", Global.PLAYER_Leader));
  • Wait(0.250, Ignore Condition);
  • Call Subroutine(TURN_Next);
  • Else;
  • Small Message(All Players(All Teams), Custom String("{0}'s course less than minimum of {1} checkpoints", Global.PLAYER_Leader,
  • Global.INT_Course_Min_Checkpoints));
  • Wait(0.250, Ignore Condition);
  • Call Subroutine(ROUND_Next);
  • End;
  • }
  • }
  • rule("GLOBAL: Leader ran out of time")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Global.PLAYER_Leader.BOOL_Started == True;
  • Global.PLAYER_Leader.BOOL_Finished == False;
  • disabled Global.REAL_Time_Remaining == 0;
  • Match Time == 0;
  • }
  • actions
  • {
  • Pause Match Time;
  • Set Match Time(Global.REAL_Allowed_Delay_Seconds);
  • Global.PLAYER_Leader.BOOL_Finished = True;
  • Big Message(All Players(All Teams), Custom String("{0}'s run finished", Global.PLAYER_Leader));
  • Small Message(Global.PLAYER_Leader, Custom String("Time's up!"));
  • Wait(0.250, Ignore Condition);
  • Call Subroutine(TURN_Next);
  • }
  • }
  • rule("PLAYER: Follower dies (Teleport follower near to the checkpoint if not started yet.)")
  • {
  • event
  • {
  • Player Died;
  • All;
  • All;
  • }
  • conditions
  • {
  • Event Player == Global.PLAYER_Follower;
  • Event Player.BOOL_Started == False;
  • "Course has been laid out, or at least the first checkpoint has."
  • Global.VECTORS_EFFECTS_Checkpoints != Empty Array;
  • }
  • actions
  • {
  • Respawn(Event Player);
  • Wait(0.250, Ignore Condition);
  • Teleport(Event Player, Nearest Walkable Position(First Of(First Of(Global.VECTORS_EFFECTS_Checkpoints))));
  • }
  • }
  • rule("GLOBAL: Follower times out before starting course")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Global.PLAYER_Leader.BOOL_Finished == True;
  • Global.PLAYER_Follower.BOOL_Started == False;
  • disabled Global.REAL_Time_Remaining == 0;
  • Match Time == 0;
  • }
  • actions
  • {
  • Pause Match Time;
  • Set Match Time(Global.REAL_Allowed_Delay_Seconds);
  • Small Message(All Players(All Teams), Custom String("{0} took too long to start following course", Global.PLAYER_Follower));
  • Wait(0.250, Ignore Condition);
  • Global.BOOL_Turn_Ended = True;
  • }
  • }
  • rule("GLOBAL: Follower begins turn")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Global.PLAYER_Leader.BOOL_Finished == True;
  • Global.PLAYER_Follower.BOOL_Started == False;
  • Is On Wall(Global.PLAYER_Follower) == True;
  • Distance Between(Eye Position(Global.PLAYER_Follower), First Of(First Of(Global.VECTORS_EFFECTS_Checkpoints)))
  • <= Global.REAL_Checkpoint_Radius * Global.REAL_Checkpoint_Radius_Factor;
  • }
  • actions
  • {
  • Pause Match Time;
  • "No time limit for follower (for now, anyway)."
  • Set Match Time(0);
  • Stop Chasing Global Variable(REAL_Time_Remaining);
  • Global.PLAYER_Follower.BOOL_Started = True;
  • disabled Call Subroutine(FOLLOWER_Checkpoint);
  • Small Message(All Players(All Teams), Custom String("{0} began following course", Global.PLAYER_Follower));
  • }
  • }
  • rule("GLOBAL: Follower hits checkpoint")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Global.PLAYER_Leader.BOOL_Finished == True;
  • Global.PLAYER_Follower.BOOL_Started == True;
  • Global.PLAYER_Follower.BOOL_Finished == False;
  • Distance Between(Eye Position(Global.PLAYER_Follower), Global.VECTORS_EFFECTS_Checkpoints[Global.INT_Checkpoints_Completed][0])
  • <= Global.REAL_Checkpoint_Radius * Global.REAL_Checkpoint_Radius_Factor;
  • }
  • actions
  • {
  • Call Subroutine(FOLLOWER_Checkpoint);
  • }
  • }
  • rule("GLOBAL: Follower finished")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Global.PLAYER_Leader.BOOL_Finished == True;
  • Global.PLAYER_Follower.BOOL_Started == True;
  • Global.PLAYER_Follower.BOOL_Finished == False;
  • Is On Ground(Global.PLAYER_Follower) == True;
  • }
  • actions
  • {
  • Pause Match Time;
  • Set Match Time(Global.REAL_Allowed_Delay_Seconds);
  • Global.PLAYER_Follower.BOOL_Finished = True;
  • Global.BOOL_Turn_Ended = True;
  • }
  • }
  • rule("GLOBAL: Follower turn ended (used to be subroutine, but that seems to come with race conditions; this seems to work better)")
  • {
  • event
  • {
  • Ongoing - Global;
  • }
  • conditions
  • {
  • Global.BOOL_Turn_Ended == True;
  • }
  • actions
  • {
  • Pause Match Time;
  • Set Match Time(Global.REAL_Allowed_Delay_Seconds);
  • If(Global.INT_Checkpoints_Completed == Count Of(Global.VECTORS_EFFECTS_Checkpoints));
  • Big Message(All Players(All Teams), Custom String("{0} hit all checkpoints", Global.PLAYER_Follower));
  • "Without these Wait()s, the messages display the wrong values, even though the variables are set to the right values when the call is made."
  • Wait(0.250, Ignore Condition);
  • Else;
  • "Update follower's score."
  • Modify Player Score(Global.PLAYER_Follower, -1 * (Count Of(Global.VECTORS_EFFECTS_Checkpoints)
  • - Global.INT_Checkpoints_Completed));
  • Big Message(All Players(All Teams), Custom String("{0} hit {1} of {2} checkpoints", Global.PLAYER_Follower,
  • Global.INT_Checkpoints_Completed, Count Of(Global.VECTORS_EFFECTS_Checkpoints)));
  • "See previous."
  • Wait(0.250, Ignore Condition);
  • End;
  • Call Subroutine(TURN_Next);
  • }
  • }
  • rule("PLAYER: Teleports to #1")
  • {
  • event
  • {
  • Ongoing - Each Player;
  • All;
  • All;
  • }
  • conditions
  • {
  • Global.PLAYER_Leader.BOOL_Finished == True;
  • ((Event Player == Global.PLAYER_Follower && Global.PLAYER_Follower.BOOL_Started == False) || (
  • Event Player != Global.PLAYER_Follower)) == True;
  • Is Button Held(Event Player, Reload) == True;
  • }
  • actions
  • {
  • If(Global.VECTORS_EFFECTS_Checkpoints == Empty Array);
  • Small Message(Event Player, Custom String("Course not yet laid out"));
  • Else;
  • Small Message(Event Player, Custom String("Teleporting to checkpoint #1"));
  • Teleport(Event Player, Nearest Walkable Position(First Of(First Of(Global.VECTORS_EFFECTS_Checkpoints))));
  • Set Facing(Event Player, Direction Towards(Eye Position(Event Player), First Of(First Of(Global.VECTORS_EFFECTS_Checkpoints))),
  • To World);
  • End;
  • }
  • }
  • rule("SUBR: ROUND_Next")
  • {
  • event
  • {
  • Subroutine;
  • ROUND_Next;
  • }
  • actions
  • {
  • "Silly dance with match time to avoid players being stuck in undocumented and inaccessible COUNTDOWN phase when the game starts."
  • If(!Is Game In Progress);
  • Set Match Time(0);
  • End;
  • "Pause and set match time (trying to avoid triggering timeout rules before the player has a chance)."
  • Pause Match Time;
  • Set Match Time(Global.REAL_Allowed_Delay_Seconds);
  • "Reset global variables."
  • Global.VECTORS_EFFECTS_Checkpoints = Empty Array;
  • Global.PLAYER_Follower = Null;
  • Global.PLAYERS_Tried_This_Round = Empty Array;
  • Global.INT_Checkpoints_Completed = 0;
  • "Choose new \"it\"."
  • Global.PLAYER_Leader = First Of(Sorted Array(All Players(All Teams), Current Array Element.INT_Times_Leader));
  • "Increment that player's times-it counter."
  • Global.PLAYER_Leader.INT_Times_Leader += 1;
  • "Announce."
  • Big Message(All Players(All Teams), Custom String("{0} is the leader", Global.PLAYER_Leader));
  • Small Message(Global.PLAYER_Leader, Custom String("You're the leader. Press {0} when ready, then start wallriding.",
  • Input Binding String(Button(Interact))));
  • "Initialize new leader's variables."
  • Global.PLAYER_Leader.BOOL_Ready = False;
  • Global.PLAYER_Leader.BOOL_Started = False;
  • Global.PLAYER_Leader.BOOL_Finished = False;
  • Global.PLAYER_Of_Interest = Global.PLAYER_Leader;
  • Unpause Match Time;
  • }
  • }
  • rule("SUBR: CHECKPOINT_Record")
  • {
  • event
  • {
  • Subroutine;
  • CHECKPOINT_Record;
  • }
  • actions
  • {
  • "Save position in a variable to ensure that the position of the effect and the recorded vector are the same."
  • Global.VECTOR_Temp = Eye Position(Global.PLAYER_Leader);
  • Abort If(Global.VECTORS_EFFECTS_Checkpoints != Empty Array && Distance Between(Global.VECTOR_Temp, First Of(Last Of(
  • Global.VECTORS_EFFECTS_Checkpoints))) <= Global.REAL_Checkpoint_Min_Separation);
  • Global.INT_Checkpoints_Completed += 1;
  • Create Effect(Global.PLAYERS_All, Sphere, Green, Global.VECTOR_Temp, Global.REAL_Checkpoint_Radius, Visible To);
  • Global.VECTORS_EFFECTS_Checkpoints[Count Of(Global.VECTORS_EFFECTS_Checkpoints)] = Array(Global.VECTOR_Temp, Last Created Entity);
  • Create In-World Text(Global.PLAYERS_All, Global.INT_Checkpoints_Completed, Global.VECTOR_Temp, 1, Do Not Clip, Visible To, White,
  • Default Visibility);
  • }
  • }
  • rule("SUBR: TURN_Next")
  • {
  • event
  • {
  • Subroutine;
  • TURN_Next;
  • }
  • actions
  • {
  • Pause Match Time;
  • Set Match Time(Global.REAL_Allowed_Delay_Seconds);
  • "Select next follower."
  • Global.PLAYER_Follower = Random Value In Array(Filtered Array(All Players(All Teams), !(
  • Current Array Element == Global.PLAYER_Leader || Array Contains(Global.PLAYERS_Tried_This_Round, Current Array Element))));
  • "Next follower's turn."
  • If(Entity Exists(Global.PLAYER_Follower));
  • "Add to list of followers this round."
  • Modify Global Variable(PLAYERS_Tried_This_Round, Append To Array, Global.PLAYER_Follower);
  • "Announce."
  • Small Message(All Players(All Teams), Custom String("{0}'s turn to follow", Global.PLAYER_Follower));
  • Small Message(Global.PLAYER_Follower, Custom String("Your turn! Go to checkpoint #1 and start wallriding!", Input Binding String(
  • Button(Interact)), Global.PLAYER_Leader));
  • "Wait 2 seconds to try to avoid the follower accidentally skipping his turn."
  • Wait(2, Ignore Condition);
  • "Reset variables."
  • Global.INT_Checkpoints_Completed = 0;
  • Global.PLAYER_Of_Interest = Global.PLAYER_Follower;
  • Global.BOOL_Turn_Ended = False;
  • "Reset follower's status variables."
  • Global.PLAYER_Follower.BOOL_Ready = False;
  • Global.PLAYER_Follower.BOOL_Started = False;
  • Global.PLAYER_Follower.BOOL_Finished = False;
  • "Match time."
  • Set Match Time(Global.REAL_Allowed_Delay_Seconds);
  • "Reset current-checkpoint effect."
  • Destroy Effect(Global.EFFECT_Current_Checkpoint);
  • Create Effect(Global.PLAYERS_All, Sphere, Orange, Global.VECTORS_EFFECTS_Checkpoints[Global.INT_Checkpoints_Completed][0],
  • Global.REAL_Checkpoint_Radius / 2, Visible To Position and Radius);
  • Global.EFFECT_Current_Checkpoint = Last Created Entity;
  • "Reset current-checkpoint effect #2."
  • Destroy Effect(Global.EFFECT_Current_Checkpoint_2);
  • Create Effect(Global.PLAYERS_All, Good Aura, Orange, Global.VECTORS_EFFECTS_Checkpoints[Global.INT_Checkpoints_Completed][0],
  • Global.REAL_Checkpoint_Radius / 2, Visible To Position and Radius);
  • Global.EFFECT_Current_Checkpoint_2 = Last Created Entity;
  • Unpause Match Time;
  • "No more followers. Next round."
  • Else;
  • Call Subroutine(ROUND_Next);
  • End;
  • }
  • }
  • rule("SUBR: FOLLOWER_Checkpoint")
  • {
  • event
  • {
  • Subroutine;
  • FOLLOWER_Checkpoint;
  • }
  • actions
  • {
  • Global.INT_Checkpoints_Completed += 1;
  • Play Effect(All Players(All Teams), Good Explosion, Green, Global.PLAYER_Follower, 2);
  • Play Effect(All Players(All Teams), Good Explosion, Orange, First Of(
  • Global.VECTORS_EFFECTS_Checkpoints[Global.INT_Checkpoints_Completed - 1]), Global.REAL_Checkpoint_Radius);
  • Play Effect(All Players(All Teams), Buff Explosion Sound, White, Global.PLAYER_Follower, 50);
  • If(Global.INT_Checkpoints_Completed == Count Of(Global.VECTORS_EFFECTS_Checkpoints));
  • Global.BOOL_Turn_Ended = True;
  • End;
  • }
  • }
Join the Workshop.codes Discord