Hello, i need to randomize colours of players, but there cannot be any 2 players that have same colour. Can somebody post there GUI trigger for it? because i dont really know how to check if some other player have same colour and change it to other.
1. Add all colours to a playercolor list.
2. Get random element of list.
3. Remove element from 2 from the list.
4. Set player color to element from 2.
5. Repeat from step 2 until all players have a color.
If an array list is used, then a simple random index within the array list will work.2. What random element? How to make
Using a local or locally used global as described above. You then replace that index with the maximum index value and decrement the size of the array list (discarding the maximum value).3. undestand but how implement that element
Just set the player's color to color (computed as described above).4. kinda ok
Or call the function again, or loop again. Depends on how you want to implement it.5. run again trigger...
You posted your trigger as a wtg file instead of in a readable form.What i did wrong?