team.SetColor ?


I’m back with another hard question… I’m working on a script and I would like to use the team.GetColor function on the wiki.

I can’t find out how to set it though, it always comes out to be a yellowish white… how do you set the teamcolor?


I believe the only way to set it is when you make a team using team.SetUp.

Can you give us the code you are currently using?

Didn’t you get an error for this? team.GetColor( teamnumber ), hence the name, GETS the COLOR of the TEAM, droopy richard(lol see what I did there? :D) was right, the only way to set the color of a team is with team.SetUp()

I have no idea if this is possible, but if you are allowed to create a new team/edit a team in the middle of the game, then you could…do that

Thanks, you rock! Lua helper for you!

Thanks everyone else for your replies.

damn that’s original :stuck_out_tongue:

And, glad to have helped you Virus.

Also if you are testing this in single player, the default team color is yellowish.

… unless there are teams

function team.SetColor(id,col)
team.GetAllTeams[id].Color = col
Should be ran on client and server.