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;
}
Reddit, Slack, Google, Facebook, Instagram — these companies use our data — directly or indirectly — to train the next generation of AI language models. Yet, I don’t remember anyone asking our permission, and in doing so, these companies have proven the adage that customers’ data is their main...
Our new website went up early yesterday. Health Empowers You. 200 smoothie recipe guide and soon we will have detox, cognitive enhancement, weightloss teas and some coffee blends. https://healthempowersyou.net/products/smoothie-recipe-guide
It never fails that as soon as I say something about the bots they come back - this time they are under a whole new IP range - one thing in common though, Chinese!