I am trying to figure out how to create a trigger to add 2 players at random to player groups, having 8 players total, making 4 groups of 2 each in them. Anyone have any thoughts?
A simple way that is easy to accomplish would be the following:
Use an array with a size of 8. Fill it with the playernumbers of your players.
Use a random integer from 0 to 7, put that player in the first team. Now move the Integer value from position 7 to the position you just used.
example:
random integer = 4
team1, player 1 = MyArray[4]
MyArray[4] = MyArray[7]
Now repeat this (beginning with the random integer) till you got your teams filled.
pseudo code:
int[4][2] Teams;
int TeamCounter;
int TeamMember;
int[8] RandomizationArray;
int Random;
int Counter;
Counter = 0;
while (Counter <= 7) {
RandomizationArray[Counter] = Counter;
Counter += 1;
}
Counter = 7;
TeamCounter = 0;
TeymMember = 0;
while (Counter >=0){
Random = RandomInt(0,Counter);
Teams[TeamCounter][TeamMember] = RandomizationArray[Random];
if (TeamMember == 0) {
TeamMember = 1;
} else {
TeamMember = 0;
TeamCounter += 1;
}
RandomizationArray[Random] = RandomizationArray[Counter];
Counter -= 1;
}
I do know this - xenforo dropped the ball by not keeping the vbulletin reputation comments as a feature. The loss of the Reputation comments data when we switched to Xenforo really was the death knell for the site when it came to all the users that left. I know I missed it so much and I got way less interested in the site when that feature was gone and I run the site.
I'm on a page about incorrect corrections, and spent the better part of like two hours trying to get someone to understand that -5^2 = -25, not 25, and then that post had comments get reposted because that group is self sustaining, and that person was in turn trying to explain what I just explained to them. And I'm taking that as a victory