• Check out the results of the Techtree Contest #19!
  • 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!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Hero kills Hero (Player Colors)

Level 5
Joined
Jan 23, 2025
Messages
40
1778005367111.webp


Hello, I have this activator and I would like the:

NAME OF DYING UNIT to be the same color as the player, and the NAME OF KILLING UNIT to also be the same color as the player.

1778005785820.webp


This is how it looks. I just need the text with the players' colors.

If variables need to be used, I'm new to this. A map would be appreciated. Thanks.
 
You need to set up the color in a string variable with an array, luckily I have the references of the official colors:

  • Actions
    • Set VariableSet ColorCode[1] = |cffff0303
    • Set VariableSet ColorCode[2] = |cff0042ff
    • Set VariableSet ColorCode[3] = |cff1be7ba
    • Set VariableSet ColorCode[4] = |cff550081
    • Set VariableSet ColorCode[5] = |cfffefc00
    • Set VariableSet ColorCode[6] = |cfffe890d
    • Set VariableSet ColorCode[7] = |cff21bf00
    • Set VariableSet ColorCode[8] = |cffe45caf
    • Set VariableSet ColorCode[9] = |cff939596
    • Set VariableSet ColorCode[10] = |cff7ebff1
    • Set VariableSet ColorCode[11] = |cff106247
    • Set VariableSet ColorCode[12] = |cff4f2b05
    • Set VariableSet ColorCode[13] = |cff9c0000
    • Set VariableSet ColorCode[14] = |cff0000c3
    • Set VariableSet ColorCode[15] = |cff00ebff
    • Set VariableSet ColorCode[16] = |cffbd00ff
    • Set VariableSet ColorCode[17] = |cffecce87
    • Set VariableSet ColorCode[18] = |cfff7a58b
    • Set VariableSet ColorCode[19] = |cffbfff81
    • Set VariableSet ColorCode[20] = |cffdbb8eb
    • Set VariableSet ColorCode[21] = |cff4f5055
    • Set VariableSet ColorCode[22] = |cffecf0ff
    • Set VariableSet ColorCode[23] = |cff00781e
    • Set VariableSet ColorCode[24] = |cffa56f34
Then you use concatenated strings using the player numbers to determine the color (don't forget the |r to stop the color)

  • Game - Display to (All players) the text: ((((ColorCode[(Player number of (Owner of (Triggering unit)))] + (Name of (Owner of (Triggering unit)))) + |r) + has been killed by ) + ((ColorCode[(Player number of (Owner of (Killing unit)))] + (Name of (Owner of (Killing unit)))) + |r.))
 
Back
Top