Baoulettes

Overwatch hide and seek random seeker team making

Nov 8th, 2021
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.40 KB | None | 0 0
  1. actions {
  2. Global.Moving_Speed = 0;
  3. "Init currently selected Random seeker to be null to force it to be somehow different"
  4.  
  5. Global.TeamMaking_RandomSeeker = Null;
  6.  
  7. "Set the currently selected Seeker slots to 0 "
  8. Global.TeamMaking_SeekerCurrSlot = 0;
  9.  
  10. "Set available Seeker to the number of team slots (most of case for us 3)"
  11. Global.TeamMaking_RemainingSeekerSlots = Number Of Slots(Team 2);
  12.  
  13. "Array of just all hider"
  14. Global.TeamMaking_AllHider = All Players(Team 1);
  15.  
  16. "Array of just current Seeker (by current mean Before match making.)"
  17. Global.TeamMaking_CurrentSeeker = All Players(Team 2);
  18.  
  19. "Remove winner from potential Seeker (if (s)he wishing, this player will remain in wishing array.)"
  20. Global.TeamMaking_NextSeeker = Filtered Array(Global.TeamMaking_AllHider, Current Array Element != Global.Winner);
  21.  
  22. "Remove wishing player from Potential Seeker (to prevent a player to be moved two time)"
  23. Global.TeamMaking_NextSeeker = Filtered Array(Global.TeamMaking_NextSeeker, Global.TeamMaking_WishingPlayer[Current Array Element] != True);
  24.  
  25. "Tell the game mode we are in team making"
  26. Global.TeamMaking = True;
  27.  
  28. "Remove Seeker 0 from the team so the slot is actually free"
  29. Move Player to Team(Players In Slot(0, Team 2), Team 1, -1);
  30. Wait(0.100, Ignore Condition);
  31.  
  32. "Remove Seeker 1 from the team so the slot is actually free"
  33. Move Player to Team(Players In Slot(1, Team 2), Team 1, -1);
  34. Wait(0.100, Ignore Condition);
  35.  
  36. "Remove Seeker 2 from the team so the slot is actually free"
  37. Move Player to Team(Players In Slot(2, Team 2), Team 1, -1);
  38. Wait(0.100, Ignore Condition);
  39.  
  40. "Check if there is actually any Wishing players"
  41. If(Count Of(Global.TeamMaking_WishingPlayer) > 0);
  42.  
  43. "Count MovingPlayer +1 per slot in team Seeker (loop for number a Seeker slots)"
  44. For Global Variable(TeamMaking_MovingPlayers, 0, Count Of(Global.TeamMaking_WishingPlayer), 1);
  45.  
  46. "Move randomly selected Wisher to Seeker team (Needed in case there is more wisher than seeker slots."
  47. Move Player to Team(Global.TeamMaking_WishingPlayer[Global.TeamMaking_MovingPlayers], Team 2, Global.TeamMaking_SeekerCurrSlot);
  48. Wait(0.100, Ignore Condition);
  49.  
  50. "Keep track of used Seeker slots, this way we can later count how many left"
  51. Global.TeamMaking_SeekerCurrSlot += 1;
  52.  
  53. "Check if we are not running out of available slots"
  54. If(Global.TeamMaking_SeekerCurrSlot > Number Of Slots(Team 2));
  55. "If we run out of slots, init the restart of the match to prevent POTG stuffs."
  56. Wait(3, Ignore Condition);
  57.  
  58. "If we use auto restart or not"
  59. If(Global.Settings_General[14] == True);
  60. Restart Match;
  61. Else;
  62. Return to Lobby;
  63. End;
  64. End;
  65. End;
  66. End;
  67.  
  68. "Fill the remaining slots or actually start if there is not Wisher"
  69. For Global Variable(TeamMaking_MovingPlayers, 0, Number Of Slots(Team 2), 1);
  70.  
  71. "We only start if there is a free slot."
  72. If(Players In Slot(Global.TeamMaking_SeekerCurrSlot, Team 2) == Null);
  73.  
  74. "Get a random Seeker from available list."
  75. Global.TeamMaking_RandomSeeker = Random Value In Array(Global.TeamMaking_NextSeeker);
  76.  
  77. "Remove our Random selected seeker from potential seeker (this way it can not be reselected"
  78. Global.TeamMaking_NextSeeker = Remove From Array(Global.TeamMaking_NextSeeker, Global.TeamMaking_RandomSeeker);
  79.  
  80. "Actually moving our new seeker in team"
  81. Move Player to Team(Global.TeamMaking_RandomSeeker, Team 2, Global.TeamMaking_MovingPlayers);
  82.  
  83. "Keeping track the last used seeker slot."
  84. Global.TeamMaking_SeekerCurrSlot += 1;
  85.  
  86. "Check if we are not running out of available slots"
  87. If(Global.TeamMaking_SeekerCurrSlot > Number Of Slots(Team 2));
  88.  
  89. "If we run out of slots, init the restart of the match to prevent POTG stuffs."
  90. Wait(3, Ignore Condition);
  91.  
  92. "If we use auto restart or not"
  93. If(Global.Settings_General[14] == True);
  94. Restart Match;
  95. Else;
  96. Return to Lobby;
  97. End;
  98. End;
  99. "We should never fall there but in case we do actually force start the match"
  100. Else;
  101. Wait(3, Ignore Condition);
  102. "If we use auto restart or not"
  103. If(Global.Settings_General[14] == True);
  104. Restart Match;
  105. Else;
  106. Return to Lobby;
  107. End;
  108. End;
  109. End;
  110.  
  111. Wait(3, Ignore Condition);
  112. "If we use auto restart or not"
  113. If(Global.Settings_General[14] == True);
  114. Restart Match;
  115. Else;
  116. Return to Lobby;
  117. End;
  118. }
Add Comment
Please, Sign In to add comment