ID:147329
 
Normally i am a great coder and can code almost anything that anyone and myself wants. However i am completely stumped on this and im getting boerd trying so i'll ask u people: How can i code it so that when a mob logs in, the game will check to see if there is a player with the color "Blue". If there is a blue team player, then it will check for Red, Yellow and green. And if there all taken it will make them a spectator. How do i code that?

If you dont know what im talking about, i mean like the color system in Castle by Abra.
Reinhartstar wrote:
Normally i am a great coder and can code almost anything that anyone and myself wants. However i am completely stumped on this and im getting boerd trying so i'll ask u people: How can i code it so that when a mob logs in, the game will check to see if there is a player with the color "Blue". If there is a blue team player, then it will check for Red, Yellow and green. And if there all taken it will make them a spectator. How do i code that?

If you dont know what im talking about, i mean like the color system in Castle by Abra.

One way to do what you want is by having a global variable for each colour. When a player becomes, say the Blue player, that variable gets set to their key. When they leave, the variable gets set to "". Just do an if() check for the variables in Login(), and stop once the new player gets a colour/becomes a spectator.