Local Team Colors 1.2

Local Team Colors 1.2

Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)

Moderator: Moderators

Post Reply
User avatar
very_bad_soldier
Posts: 1397
Joined: 20 Feb 2007, 01:10

Local Team Colors 1.2

Post 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
Last edited by very_bad_soldier on 25 Apr 2009, 17:28, edited 1 time in total.
User avatar
Licho
Zero-K Developer
Posts: 3803
Joined: 19 May 2006, 19:13

Re: Local Team Colors 1.1

Post 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.
Post Reply

Return to “Lua Scripts”