• 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.
  • 💡 We're thrilled to announce that our upcoming texturing contest is in the works, and we're eager to hear your suggestions! Please take this opportunity to share your ideas in this theme discussion thread for the Texturing Contest #34!
  • 🏆 Hive's 7th HD Modeling Contest: Icecrown Creature is now open! The frozen wastes of Icecrown are home to some of Azeroth’s most terrifying and resilient creatures. For this contest, your challenge is to design and model a HD 3D monster that embodies the cold, undead, and sinister essence of Icecrown! 📅 Submissions close on April 13, 2025. Don't miss this opportunity to let your creativity shine! Enter now and show us your frozen masterpiece! 🔗 Click here to enter!

[Solved] Player Name with Colors

Status
Not open for further replies.
Level 4
Joined
Jan 30, 2012
Messages
61
Hello,

In my map there is a trigger which is showing like this:

<Player 1> has just killed <Player 6>


But how can i do that the names are in they player color??

So then should be there like this:

<Player 1> (in red color) has just killed <Player 6> (in orange color)

etc.
 
Level 12
Joined
Dec 20, 2011
Messages
885
Use concatenate strings to add colors to players' names. Here's a trigger for that:

  • Game - Display to (All players) the text: (|c00000000 + (Name of (Triggering player)))
You change |c00000000 into the color code you want, so that the player's name will be colored. Oh, I forgot, add another string after "triggering player" that has the text |r so that the color you used does not get used in the whole text. Sorry 'bout that. Here are some color codes, btw: http://world-editor-tutorials.thehelper.net/colors.php

Here's a full code for a player killing another player along with colors to them. Player = Black colored, and other text = white colored, you may change that if you want to:

  • Game - Display to (All players) the text: (|c00000000 + ((Name of (Triggering player)) + (has pwned + (|c00000000 + ((Name of (Triggering player)) + (|r's head for + 1 gold!))))))
Ingame it would look like this:

Hexcellion has pwned RandomGuy's head for 1 gold!
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
  • Set TextColor[1] = |c00FF0000
  • Set TextColor[2] = |c000042FF
  • Set TextColor[3] = |c001CE6B9
  • Set TextColor[4] = |c00540081
  • Set TextColor[5] = |c00FFFC01
  • Set TextColor[6] = |c00FEBA0E
  • Set TextColor[7] = |c0020C000
  • Set TextColor[8] = |c00E55BB0
  • Set TextColor[9] = |c00959697
  • Set TextColor[10] = |c007EBFF1
  • Set TextColor[11] = |c00106246
  • Set TextColor[12] = |c004E2A04
TextColor is a string array.

Use concatenate strings, use TextColor[player number of killing unit] and TextColor[player number of dying unit] and don't forget the |r to end the colour code.
 
Level 4
Joined
Jan 30, 2012
Messages
61
  • Set Colors
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set TextColor[1] = |c00FF0000
      • Set TextColor[2] = |c000042FF
      • Set TextColor[3] = |c001CE6B9
      • Set TextColor[4] = |c00540081
      • Set TextColor[5] = |c00FFFC01
      • Set TextColor[6] = |c00FEBA0E
      • Set TextColor[7] = |c0020C000
      • Set TextColor[8] = |c00E55BB0
      • Set TextColor[9] = |c00959697
      • Set TextColor[10] = |c007EBFF1

i did this now....

but the trigger dont work...



  • Kill anzeige TeamDeathmatch Copy
    • Events
      • Unit - A unit Dies
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • ((Triggering unit) is A Hero) Equal to True
          • (Owner of (Dying unit)) Not equal to (Owner of (Killing unit))
          • ((Dying unit) belongs to an ally of Player 6 (Orange)) Equal to True
    • Actions
      • Game - Display to (All players) for 8.00 seconds the text: ((String((Player number of (Owner of (Killing unit))))) + ((Name of (Owner of (Killing unit))) + (|r has just killed + ((String((Player number of (Owner of (Dying unit))))) + ((Name of (Owner of (Dying unit))) + (|r + ( with + (|c00ff0000 + ((Name of (Killi
...

oh ok i know it now ^^ i fixed it ^^ it works !!!! :D thanks thanks thanks ^^
 
Last edited by a moderator:
Status
Not open for further replies.
Top