HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Are there any set functions that can display a players name in their color?

03-22-2005, 03:26 AM#1
Fragmentation
Hi

I was wondering if there is a function that allows me to display a string with the players color or do I have to manually set a variable or something.

I ask this because for something as simple as this I hope there was a simple function and I wouldn't have to resort for a trigger for every player whenever needed just to figure out their color and display their name in that color.

Thanks

As for what I am really working at. For example in TidesOfBlood, they display the players names in the players color whenever a hero dies etc. I just want to display the persons name in color in my triggers that contain text strings etc.

P.S - I know about color codes, but then I would still have to create a trigger for every player because the color code is fixed
03-22-2005, 04:03 AM#2
AnarkiNet
make a string variable like "PlayerColor" and make it an array. then make each value in the array be a color.

do like:
set PlayerColor[1] = "|cffff0000" + name of (player 1)
set PlayerColor[2] = "|cff0000ff" + name of (player 2)

etc.

then when you want a players name to be colored just use the variable.

like,
display text to force: PlayerColor[player number of (triggering player)] + " has just blah"

and it will display the player's name in their respective color.
03-22-2005, 04:15 AM#3
Fragmentation
Thanks, just what I needed to know
03-22-2005, 04:28 AM#4
Fragmentation
oh BTW, does anyone know the exact color codes for each player color in the game

I don't want the coloring to look out of place
03-22-2005, 05:56 AM#5
Anitarf
Look here.
03-22-2005, 07:43 AM#6
Fragmentation
Awesome

Thanks