Page 1 of 1

Local Team Colors 1.2

Posted: 20 Apr 2009, 21:22
by very_bad_soldier
Annoyed by having a different teamcolor every game? You cant tell your teammates apart cause they have different colors in every game too?
This let you assign your own teamcolors for certain players. These colors are only displayed in your game, all other players will still see their original colors.
To avoid duplicate colors, if a color you want to assign is already occupied by another player his color gets changed to your original/previous color.

You have to enter the names of players you want to recolor inside the widget. The colors are in RGB with values between 0.0 - 1.0. If you have your color in values between 0 - 255, just divide by 255 :)

Examples:

Code: Select all

local customColors = {}
customColors["[x]very_bad_soldier"] = { r = 1.0, g = 0.65098, b = 0.0}
customColors["AnotherPlayer"] = { r = 1.0, g = 1.0, b = 0.5}
Remember: Critics, bugreports and comments are welcome!
Thanks to the guys in #lua for help! The idea for this is borrowed from another thread :)

Changelog
1.2: Resets colors when widget gets disabled

Re: Local Team Colors 1.1

Posted: 20 Apr 2009, 22:24
by Licho
Also note that there is existing other way

http://licho.eu/teamcolors.lua

if you put this to spring folder (not widgets) it will color you to teal, allys shades of blue/green and enemies shades of red/yellow/purple etc.