Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
Import this into your map's custom script section.
function GetPlayerNameColored takes player p returns string
local playercolor pc = p
local string s
if pc == PLAYER_COLOR_RED then
set s = "|cffFF0000"
elseif pc == PLAYER_COLOR_BLUE then
set s = "|cff0000FF"
elseif pc == PLAYER_COLOR_CYAN then
set s = "|cff00FFFF"
elseif pc == PLAYER_COLOR_PURPLE then
set s = "|cff800080"
elseif pc == PLAYER_COLOR_YELLOW then
set s = "|cffFFFF00"
elseif pc == PLAYER_COLOR_ORANGE then
set s = "|cffFF8000"
elseif pc == PLAYER_COLOR_GREEN then
set s = "|cff00FF00"
elseif pc == PLAYER_COLOR_PINK then
set s = "|cffFF80C0"
elseif pc == PLAYER_COLOR_LIGHT_GRAY then
set s = "|cffC0C0C0"
elseif pc == PLAYER_COLOR_LIGHT_BLUE then
set s = "|cff8080FF"
elseif pc == PLAYER_COLOR_AQUA then
set s = "|cff008040"
elseif pc == PLAYER_COLOR_LIGHT_BLUE then
set s = "|cff804000"
else
set s = "|cff808080"
endif
set pc = null
return s+GetPlayerName(p)+|r
endfunction
Import this into your map's custom script section.
function GetPlayerNameColored takes player p returns string
local playercolor pc = p
local string s
if pc == PLAYER_COLOR_RED then
set s = "|cffFF0000"
elseif pc == PLAYER_COLOR_BLUE then
set s = "|cff0000FF"
elseif pc == PLAYER_COLOR_CYAN then
set s = "|cff00FFFF"
elseif pc == PLAYER_COLOR_PURPLE then
set s = "|cff800080"
elseif pc == PLAYER_COLOR_YELLOW then
set s = "|cffFFFF00"
elseif pc == PLAYER_COLOR_ORANGE then
set s = "|cffFF8000"
elseif pc == PLAYER_COLOR_GREEN then
set s = "|cff00FF00"
elseif pc == PLAYER_COLOR_PINK then
set s = "|cffFF80C0"
elseif pc == PLAYER_COLOR_LIGHT_GRAY then
set s = "|cffC0C0C0"
elseif pc == PLAYER_COLOR_LIGHT_BLUE then
set s = "|cff8080FF"
elseif pc == PLAYER_COLOR_AQUA then
set s = "|cff008040"
elseif pc == PLAYER_COLOR_LIGHT_BLUE then
set s = "|cff804000"
else
set s = "|cff808080"
endif
set pc = null
return s+GetPlayerName(p)+|r
endfunction
Actually in MY MAP, i just did something like this
Player Colored Names
Events:
Time - Elapsed Game time is 1.00 seconds
Conditions:
Player's 1 (Red) slot status equal to unused
Actions:
Set Player_Colored_Names[1]=|c000000|r (or something like that)
Set Player_Colored_Names[2]=|cBFSDCDF|r (just examples)
Then set every player's colours here
Then in the previous trigger i wrote just change from
Kills
Events:
Unit - A unit Dies
Conditions:
(Dying unit) is a Hero equal to True
Actions:
Game - Text to (All Players): ((Name of (Owner of (Killing unit)+has owned+ (Name of (Owner of (Dying Unit))
[/QUOTE]
TO
Kills
Events:
Unit - A unit Dies
Conditions:
(Dying unit) is a Hero equal to True
Actions:
Game - Text to (All Players): ((Player_Colored_Names[Player Number(Owner of (Killing unit)]+has owned+ (Player_Colored_Names[Player Number(Owner of (Dying Unit)])
And that's how it is in my map (something like this)
Hope it'll help
EDIT: If you need help to set something like this (the arrays, etc) just tell me here, i'll maybe make a custom test map for you
Import this into your map's custom script section.
function GetPlayerNameColored takes player p returns string
local playercolor pc = p
local string s
if pc == PLAYER_COLOR_RED then
set s = "|cffFF0000"
elseif pc == PLAYER_COLOR_BLUE then
set s = "|cff0000FF"
elseif pc == PLAYER_COLOR_CYAN then
set s = "|cff00FFFF"
elseif pc == PLAYER_COLOR_PURPLE then
set s = "|cff800080"
elseif pc == PLAYER_COLOR_YELLOW then
set s = "|cffFFFF00"
elseif pc == PLAYER_COLOR_ORANGE then
set s = "|cffFF8000"
elseif pc == PLAYER_COLOR_GREEN then
set s = "|cff00FF00"
elseif pc == PLAYER_COLOR_PINK then
set s = "|cffFF80C0"
elseif pc == PLAYER_COLOR_LIGHT_GRAY then
set s = "|cffC0C0C0"
elseif pc == PLAYER_COLOR_LIGHT_BLUE then
set s = "|cff8080FF"
elseif pc == PLAYER_COLOR_AQUA then
set s = "|cff008040"
elseif pc == PLAYER_COLOR_LIGHT_BLUE then
set s = "|cff804000"
else
set s = "|cff808080"
endif
set pc = null
return s+GetPlayerName(p)+|r
endfunction
Already wrote how Set Player_Colored_Names[1] (the[1] is player's one number, so you set string array to |c000|r something, find the colours and it works, tomorrow, if i have time, i'll make you a custom test map for this.
function GetPlayerNameColored takes player p returns string
local playercolor pc = GetPlayerColor(p)
local string s
if pc == PLAYER_COLOR_RED then
set s = "|cffFF0000"
elseif pc == PLAYER_COLOR_BLUE then
set s = "|cff0000FF"
elseif pc == PLAYER_COLOR_CYAN then
set s = "|cff00FFFF"
elseif pc == PLAYER_COLOR_PURPLE then
set s = "|cff800080"
elseif pc == PLAYER_COLOR_YELLOW then
set s = "|cffFFFF00"
elseif pc == PLAYER_COLOR_ORANGE then
set s = "|cffFF8000"
elseif pc == PLAYER_COLOR_GREEN then
set s = "|cff00FF00"
elseif pc == PLAYER_COLOR_PINK then
set s = "|cffFF80C0"
elseif pc == PLAYER_COLOR_LIGHT_GRAY then
set s = "|cffC0C0C0"
elseif pc == PLAYER_COLOR_LIGHT_BLUE then
set s = "|cff8080FF"
elseif pc == PLAYER_COLOR_AQUA then
set s = "|cff008040"
elseif pc == PLAYER_COLOR_LIGHT_BLUE then
set s = "|cff804000"
else
set s = "|cff808080"
endif
set pc = null
return s+GetPlayerName(p)+"|r"
endfunction
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.