• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[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
884
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,240
  • 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