![]() |
Quote:
|
Quote:
I was looking forward for a way to script the TTS :sort thingy, I'm trying to make the players cut in half and randomly goes to different location. |
Quote:
PHP Code:
|
Quote:
|
Quote:
temp.team = temp.teams[temp.count % temp.teams.size()]; temp.count++; Thanks! |
Quote:
|
What's temp.count and what does % do xD
|
Quote:
It basically works but...urghh I suck at explaining it, have a wiki:http://en.wikipedia.org/wiki/Modulo_operation But basically it's allowing the variable to pick between to the 2 teams swapping back and fourth. temp.count=0:0%2 = element 0 = team 1 temp.count = 1:1%2 = element 1 = team 2 temp.count = 2:2%2=0 = element 0 = team 1 temp.count = 3:3%2 = 1 = element 1 = team 2 and so on. It's a really nice solution btw emera. |
Quote:
|
Quote:
Quote:
|
Quote:
A way to ensure randomness would be to do something like: PHP Code:
|
Wish I knew what this stuff meant.
|
PHP Code:
Quote:
|
Quote:
You don't got **** me on me ;o |
Quote:
|
| All times are GMT. The time now is 10:31 AM. |
Powered by vBulletin/Copyright ©2000 - 2025, vBulletin Solutions Inc.