shuffle players

exge

New Member
Reaction score
15
ok, as the title says .. how do i make a command such that when entered, will shuffle the players on each team ... i know how to make the chat events and stuff ... just not sure about the shuffling part
 

exge

New Member
Reaction score
15
ok .. i have 2 teams .. a and b

players 1 2 3 4 5 are in team a
players 6 7 8 9 10 are in team b

when i type the chat message

players 3 7 6 4 9 are in team a
remaininng players in team b ..
that is just an example
you get what i mean?

rearrange the players in the teams
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
That's overkill for this "problem" :p


Set Players = (All players)
Player group - Clear Team1
Player group - Clear Team2
For integer A = 1 to Number of players in Players, do
- Set Player = Random player from Players
- Player group - Remove Player from Players
- If Modulo( Integer A, 2 ) == 1 then
- - Player group - Add Player to Team1
- else
- - Player group - Add Player to Team2

Completely random teams.
After that, use "player group - set alliance" to ally / unally as needed.
 

exge

New Member
Reaction score
15
thanks.. you all helped me alot on this ..

EDIT: Hey ace .. check your pm
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top