Events: Teams?
I've taken up event development, and have managed to make a few things. Currently, I'm at a loss at making teams for team events.
I need to split up the players in the room into 2 equal (random) groups, each group with a different guild name. I figure I'll need to use a randomizer, but I've never really done that before. And I'll need to apply it to all players in the room, which I have trouble doing (:p) So if you guys could help me, that'd be great. :fro: And if you could help me with the script pointing out what the more complicated parts mean, that'd be great. My goal is to learn, not to copy. |
Something simple is looping through all the players in the level and in each loop assign a team, then switch a flag, and go to the next.
PHP Code:
|
The easiest way is to use modulus (the % sign, think of it as "remainder" of division)
PHP Code:
edit: Quote:
Quote:
Quote:
Quote:
PHP Code:
|
Quote:
Quote:
|
Quote:
This line, for example: PHP Code:
I hope you don't take this as me picking on you for helping others, of course :). I'm just trying to help you give assistance in a way that's less confusing. |
Quote:
|
Modulus is so not fun enough.
Randomizing with Sortvalue PHP Code:
|
I wanted to do something where when player join the event and enter the level, they would be put on a team like this:
First person would go to Team 1, Second person would go to Team 2, Third Person would go to Team 1, and so on. I tried using server flags to make it so that if a player logged in when PHP Code:
PHP Code:
PHP Code:
PHP Code:
|
All times are GMT +2. The time now is 05:08 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.