Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- actions {
- Global.Moving_Speed = 0;
- "Init currently selected Random seeker to be null to force it to be somehow different"
- Global.TeamMaking_RandomSeeker = Null;
- "Set the currently selected Seeker slots to 0 "
- Global.TeamMaking_SeekerCurrSlot = 0;
- "Set available Seeker to the number of team slots (most of case for us 3)"
- Global.TeamMaking_RemainingSeekerSlots = Number Of Slots(Team 2);
- "Array of just all hider"
- Global.TeamMaking_AllHider = All Players(Team 1);
- "Array of just current Seeker (by current mean Before match making.)"
- Global.TeamMaking_CurrentSeeker = All Players(Team 2);
- "Remove winner from potential Seeker (if (s)he wishing, this player will remain in wishing array.)"
- Global.TeamMaking_NextSeeker = Filtered Array(Global.TeamMaking_AllHider, Current Array Element != Global.Winner);
- "Remove wishing player from Potential Seeker (to prevent a player to be moved two time)"
- Global.TeamMaking_NextSeeker = Filtered Array(Global.TeamMaking_NextSeeker, Global.TeamMaking_WishingPlayer[Current Array Element] != True);
- "Tell the game mode we are in team making"
- Global.TeamMaking = True;
- "Remove Seeker 0 from the team so the slot is actually free"
- Move Player to Team(Players In Slot(0, Team 2), Team 1, -1);
- Wait(0.100, Ignore Condition);
- "Remove Seeker 1 from the team so the slot is actually free"
- Move Player to Team(Players In Slot(1, Team 2), Team 1, -1);
- Wait(0.100, Ignore Condition);
- "Remove Seeker 2 from the team so the slot is actually free"
- Move Player to Team(Players In Slot(2, Team 2), Team 1, -1);
- Wait(0.100, Ignore Condition);
- "Check if there is actually any Wishing players"
- If(Count Of(Global.TeamMaking_WishingPlayer) > 0);
- "Count MovingPlayer +1 per slot in team Seeker (loop for number a Seeker slots)"
- For Global Variable(TeamMaking_MovingPlayers, 0, Count Of(Global.TeamMaking_WishingPlayer), 1);
- "Move randomly selected Wisher to Seeker team (Needed in case there is more wisher than seeker slots."
- Move Player to Team(Global.TeamMaking_WishingPlayer[Global.TeamMaking_MovingPlayers], Team 2, Global.TeamMaking_SeekerCurrSlot);
- Wait(0.100, Ignore Condition);
- "Keep track of used Seeker slots, this way we can later count how many left"
- Global.TeamMaking_SeekerCurrSlot += 1;
- "Check if we are not running out of available slots"
- If(Global.TeamMaking_SeekerCurrSlot > Number Of Slots(Team 2));
- "If we run out of slots, init the restart of the match to prevent POTG stuffs."
- Wait(3, Ignore Condition);
- "If we use auto restart or not"
- If(Global.Settings_General[14] == True);
- Restart Match;
- Else;
- Return to Lobby;
- End;
- End;
- End;
- End;
- "Fill the remaining slots or actually start if there is not Wisher"
- For Global Variable(TeamMaking_MovingPlayers, 0, Number Of Slots(Team 2), 1);
- "We only start if there is a free slot."
- If(Players In Slot(Global.TeamMaking_SeekerCurrSlot, Team 2) == Null);
- "Get a random Seeker from available list."
- Global.TeamMaking_RandomSeeker = Random Value In Array(Global.TeamMaking_NextSeeker);
- "Remove our Random selected seeker from potential seeker (this way it can not be reselected"
- Global.TeamMaking_NextSeeker = Remove From Array(Global.TeamMaking_NextSeeker, Global.TeamMaking_RandomSeeker);
- "Actually moving our new seeker in team"
- Move Player to Team(Global.TeamMaking_RandomSeeker, Team 2, Global.TeamMaking_MovingPlayers);
- "Keeping track the last used seeker slot."
- Global.TeamMaking_SeekerCurrSlot += 1;
- "Check if we are not running out of available slots"
- If(Global.TeamMaking_SeekerCurrSlot > Number Of Slots(Team 2));
- "If we run out of slots, init the restart of the match to prevent POTG stuffs."
- Wait(3, Ignore Condition);
- "If we use auto restart or not"
- If(Global.Settings_General[14] == True);
- Restart Match;
- Else;
- Return to Lobby;
- End;
- End;
- "We should never fall there but in case we do actually force start the match"
- Else;
- Wait(3, Ignore Condition);
- "If we use auto restart or not"
- If(Global.Settings_General[14] == True);
- Restart Match;
- Else;
- Return to Lobby;
- End;
- End;
- End;
- Wait(3, Ignore Condition);
- "If we use auto restart or not"
- If(Global.Settings_General[14] == True);
- Restart Match;
- Else;
- Return to Lobby;
- End;
- }
Add Comment
Please, Sign In to add comment