| 11-30-2004, 08:41 PM | #1 |
ok gunna try asking again... maybe this time I wont get my head bitten off... I need help with a few random triggers, say you have 6 people, how can you make it so it chooses one of the 1 - 6 randomly 6 times with out having ANY repeated? I hope that makes sence |
| 11-30-2004, 08:57 PM | #2 |
You could use a boolean-array with the size of 6, where you save which player you have got already. Then(I don't know if it's possible in GUI, but easy in JASS), use a loop and while the boolean array with index of a random number between 0 and 5(or 1 and 6) is true choose another random number. After the loop set boolarray[number] = true. The whole procedure should be repeated five times. I hope this is clear, if not feel free to ask. |
| 11-30-2004, 09:09 PM | #3 |
hmmm... it kinda makes sence.... but I dont really want to do JASS is there anyway around that? |
| 11-30-2004, 11:35 PM | #4 | |
Quote:
dont use boolean array, just add the 6 "units" to a unit group variable, then pick a random unit from this unit group and remove it from the unit group after.(that way you cant pick it again in that unit group) if you mean a random player whit people, do the same whit a playergroup variable |
